com.raelity.jvi
Class Edit

java.lang.Object
  extended by com.raelity.jvi.Edit

public class Edit
extends Object


Field Summary
static String VI_MODE_BLOCK
           
static String VI_MODE_COMMAND
           
static String VI_MODE_INSERT
           
static String VI_MODE_LINE
           
static String VI_MODE_REPLACE
           
static String VI_MODE_RESTART_I
           
static String VI_MODE_RESTART_R
           
static String VI_MODE_RESTART_V
           
static String VI_MODE_SELECT
           
static String VI_MODE_VISUAL
           
static String VI_MODE_VREPLACE
           
 
Constructor Summary
Edit()
           
 
Method Summary
static void beginline(int flags)
          NEEDSWORK: This often follows an operation that get the segment, and here we are getting it again in BEGIN_LINE.
static int beginlineColumnIndex(int flags, TextUtil.MySegment txt)
          Move cursor to start of line.
static boolean canEdit(ViTextView tv, ViBuffer buf, int offset)
           
static int cursor_down(int n, boolean upd_topline)
           
static int cursor_up(int n, boolean upd_topline)
          When TRUE: update topline.
static int oneleft()
           
static int oneright()
          oneright oneleft cursor_down cursor_up Move one char {right,left,down,up}.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VI_MODE_COMMAND

public static final String VI_MODE_COMMAND
See Also:
Constant Field Values

VI_MODE_INSERT

public static final String VI_MODE_INSERT
See Also:
Constant Field Values

VI_MODE_REPLACE

public static final String VI_MODE_REPLACE
See Also:
Constant Field Values

VI_MODE_VREPLACE

public static final String VI_MODE_VREPLACE
See Also:
Constant Field Values

VI_MODE_RESTART_I

public static final String VI_MODE_RESTART_I
See Also:
Constant Field Values

VI_MODE_RESTART_R

public static final String VI_MODE_RESTART_R
See Also:
Constant Field Values

VI_MODE_RESTART_V

public static final String VI_MODE_RESTART_V
See Also:
Constant Field Values

VI_MODE_SELECT

public static final String VI_MODE_SELECT
See Also:
Constant Field Values

VI_MODE_VISUAL

public static final String VI_MODE_VISUAL
See Also:
Constant Field Values

VI_MODE_BLOCK

public static final String VI_MODE_BLOCK
See Also:
Constant Field Values

VI_MODE_LINE

public static final String VI_MODE_LINE
See Also:
Constant Field Values
Constructor Detail

Edit

public Edit()
Method Detail

canEdit

public static boolean canEdit(ViTextView tv,
                              ViBuffer buf,
                              int offset)

beginlineColumnIndex

public static final int beginlineColumnIndex(int flags,
                                             TextUtil.MySegment txt)
Move cursor to start of line.
NEEDSWORK:


beginline

public static final void beginline(int flags)
NEEDSWORK:


oneright

public static int oneright()
oneright oneleft cursor_down cursor_up Move one char {right,left,down,up}. Return OK when successful, FAIL when we hit a line of file boundary.


oneleft

public static int oneleft()

cursor_up

public static int cursor_up(int n,
                            boolean upd_topline)
When TRUE: update topline.


cursor_down

public static int cursor_down(int n,
                              boolean upd_topline)
Parameters:
n - the number of lines to move
upd_topline - When TRUE: update topline.