Changeset 9c3f334
- Timestamp:
- Sep 30, 2010, 8:07:17 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.7, release-1.8, release-1.9
- Children:
- ac6d4e4
- Parents:
- 58a16cc
- git-author:
- David Benjamin <davidben@mit.edu> (09/29/10 14:18:35)
- git-committer:
- David Benjamin <davidben@mit.edu> (09/30/10 20:07:17)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
editwin.c
r52172cc r9c3f334 27 27 int goal_column; 28 28 int topindex; 29 int cursorx;30 29 int winlines, wincols, fillcol, wrapcol; 31 30 owl_window *win; … … 101 100 if (index != e->index) { 102 101 e->goal_column = -1; 103 e->cursorx = -1;104 102 } 105 103 e->index = index; … … 135 133 e->killbuf = NULL; 136 134 e->goal_column = -1; 137 e->cursorx = -1;138 135 e->topindex = 0; 139 136 e->excursions = NULL; … … 591 588 592 589 wmove(curswin, y, x); 593 e->cursorx = x;594 590 } 595 591 … … 1296 1292 char tmp[7]; 1297 1293 int replaced = -1; 1294 int column; 1298 1295 1299 1296 if (c == '\r') /* translate CRs to NLs */ … … 1305 1302 } 1306 1303 1307 if (e->wrapcol > 0 && e->cursorx != -1 && 1308 e->cursorx + oe_char_width(c, e->cursorx) > e->wrapcol) { 1304 column = owl_editwin_current_column(e); 1305 if (e->wrapcol > 0 && column != -1 && 1306 column + oe_char_width(c, column) > e->wrapcol) { 1309 1307 /* XXX this is actually wrong: 1310 * + If the line has been been wrapped, we can be past the wrap column but1311 * e->cursorx be much smaller.1312 1308 * + If the user went back and inserted a bunch of stuff in the middle of 1313 1309 * the line, there may be more than one word past the wrap column.
Note: See TracChangeset
for help on using the changeset viewer.