public static ViBuilderContext Create(ViEditor editor) { return(new ViBuilderContext(editor) { Builder = normalBuilder }); }
public static void CaretToScreenBottom(ViEditor ed) { int line = ed.Editor.PointToLocation (0, ed.Editor.Allocation.Height - ed.Editor.LineHeight * 2 - 2).Line; if (line < 0) line = ed.Data.Document.LineCount; ed.Data.Caret.Line = line; }
public static void CaretToScreenCenter(ViEditor ed) { var line = ed.Editor.PointToLocation (0, ed.Editor.Allocation.Height/2).Line; if (line < 0) line = ed.Data.Document.LineCount; ed.Data.Caret.Line = line; }
public static void CaretToScreenBottom(ViEditor ed) { int line = ed.Editor.PointToLocation(0, ed.Editor.Allocation.Height - ed.Editor.LineHeight * 2 - 2).Line; if (line < 0) { line = ed.Data.Document.LineCount; } ed.Data.Caret.Line = line; }
public static void CaretToScreenCenter(ViEditor ed) { var line = ed.Editor.PointToLocation(0, ed.Editor.Allocation.Height / 2).Line; if (line < 0) { line = ed.Data.Document.LineCount; } ed.Data.Caret.Line = line; }
public NewViEditMode() { ViEditor = new ViEditor (this); ViEditor.ModeChanged += (sender, e) => { if (statusArea != null) statusArea.ShowCaret = ViEditor.Mode == ViEditorMode.Command; }; ViEditor.MessageChanged += (sender, e) => { if (statusArea != null) statusArea.Message = ViEditor.Message; }; }
public NewViEditMode() { ViEditor = new ViEditor(this); ViEditor.ModeChanged += (sender, e) => { if (statusArea != null) { statusArea.ShowCaret = ViEditor.Mode == ViEditorMode.Command; } }; ViEditor.MessageChanged += (sender, e) => { if (statusArea != null) { statusArea.Message = ViEditor.Message; } }; }
static void StartRegisterBuilder(ViBuilderContext ctx, ViBuilder nextBuilder) { if (ctx.Register != '\0') { ctx.SetError("Register already set"); return; } ctx.Builder = (ViBuilderContext x) => { char c = x.LastKey.Char; if (!ViEditor.IsValidRegister(c)) { x.SetError("Invalid register"); return(true); } x.Register = c; x.Builder = nextBuilder; return(true); }; }
public static ViBuilderContext Create(ViEditor editor) { return new ViBuilderContext (editor) { Builder = normalBuilder }; }
ViBuilderContext(ViEditor editor) { this.editor = editor; Multiplier = 1; }
protected override void CaretPositionChanged() { ViEditor.OnCaretPositionChanged(); }
public static void CaretToScreenTop(ViEditor ed) { ed.Data.Caret.Line = System.Math.Max (0, ed.Editor.PointToLocation (0, ed.Editor.LineHeight - 1).Line); }
public static void CaretToLineNumber(int lineNumber, ViEditor ed) { ed.Data.Caret.Line = System.Math.Max (1, lineNumber); }
public static void CaretToLineNumber(int lineNumber, ViEditor ed) { ed.Data.Caret.Line = System.Math.Max(1, lineNumber); }
public static void CaretToScreenTop(ViEditor ed) { ed.Data.Caret.Line = System.Math.Max(0, ed.Editor.PointToLocation(0, ed.Editor.LineHeight - 1).Line); }