From 68f5a4cbfb6b434ab4e4b881792b83d2f1ce6e19 Mon Sep 17 00:00:00 2001 From: Bryan Ashby Date: Thu, 18 Jun 2015 16:27:41 -0600 Subject: [PATCH] * Nothing really, no time --- core/multi_line_edit_text_view2.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/core/multi_line_edit_text_view2.js b/core/multi_line_edit_text_view2.js index e2f8634a..b7adca47 100644 --- a/core/multi_line_edit_text_view2.js +++ b/core/multi_line_edit_text_view2.js @@ -334,15 +334,16 @@ function MultiLineEditTextView2(options) { self.topVisibleIndex = Math.max(0, startIndex - 1); self.cursorPos.row = 0; } else { - self.cursorPos.row -= remove; + + self.cursorPos.row -= (index - startIndex); } self.redrawVisibleArea(); } else { - + self.redrawVisibleArea(); // :TODO: really, only index+++ } - self.redrawVisibleArea(); + self.moveClientCusorToCursorPos(); } }; @@ -803,8 +804,7 @@ function MultiLineEditTextView2(options) { self.removeCharactersFromText( self.getTextLinesIndex(), 0, - 'line', - self.getText().length); + 'line'); }; this.adjustCursorIfPastEndOfLine = function(forceUpdate) { @@ -979,7 +979,7 @@ MultiLineEditTextView2.prototype.setFocus = function(focused) { MultiLineEditTextView2.prototype.setText = function(text) { this.textLines = [ ]; //text = "Tab:\r\n\tA\tB\tC\tD\tE\tF\tG\r\n reeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeally long word!!!"; - text = require('fs').readFileSync('/home/nuskooler/Downloads/test_text.txt', { encoding : 'utf-8'}); + text = require('fs').readFileSync('/home/bashby/Downloads/test_text.txt', { encoding : 'utf-8'}); this.insertRawText(text);//, 0, 0); this.cursorEndOfDocument();