Permalink
Browse files

Remove some duplication

  • Loading branch information...
rhburrows committed Jun 22, 2011
1 parent 5e0ad55 commit 032a22e72bcfcdd109fb200482f54bb0cd49487b
Showing with 4 additions and 9 deletions.
  1. +4 −9 src/display.js
View
@@ -111,23 +111,18 @@
this.lineLengths[line]++;
- if (c == '\n') {
- if (i == editor.pointPosition()) {
- paintCursor(this, col, row);
- }
+ if (i == editor.pointPosition()) {
+ paintCursor(this, col, row);
+ }
+ if (c == '\n') {
col = 0;
row++;
line++;
this.lineLengths[line] = 0;
currentLineCount = 0;
} else {
paintCharacter(this, c, col, row);
-
- if (i == editor.pointPosition()) {
- paintCursor(this, col, row);
- }
-
col++;
currentLineCount++;

0 comments on commit 032a22e

Please sign in to comment.