- Timestamp:
- Jul 11, 2009, 1:14:36 PM (14 years ago)
- Branches:
- master, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- c6ecf5c
- Parents:
- cf26b72
- git-author:
- Nelson Elhage <nelhage@mit.edu> (06/21/09 01:08:14)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (07/11/09 13:14:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
editwin.c
ra88f35a rd41294a 59 59 static char *oe_copy_buf(owl_editwin *e, char *buf, int len); 60 60 static int oe_copy_region(owl_editwin *e); 61 static int oe_display_column(owl_editwin *e);62 61 static char *oe_chunk(owl_editwin *e, int start, int end); 63 62 … … 1113 1112 } 1114 1113 1115 static int oe_display_column(owl_editwin *e)1114 int owl_editwin_current_column(owl_editwin *e) 1116 1115 { 1117 1116 oe_excursion x; … … 1184 1183 while(e->index < e->mark) { 1185 1184 /* if we've travelled too far, linewrap */ 1186 if (o e_display_column(e) >= e->fillcol)1185 if (owl_editwin_current_column(e) >= e->fillcol) 1187 1186 _owl_editwin_linewrap_word(e); 1188 1187 owl_editwin_point_move(e, 1); … … 1323 1322 } 1324 1323 1324 char *owl_editwin_get_region(owl_editwin *e) 1325 { 1326 int start, end; 1327 start = e->index; 1328 end = e->mark; 1329 if(start > end) { 1330 int tmp = end; 1331 end = start; 1332 start = tmp; 1333 } 1334 1335 return oe_chunk(e, start, end); 1336 } 1337 1325 1338 int owl_editwin_get_echochar(owl_editwin *e) 1326 1339 { … … 1347 1360 { 1348 1361 return oe_chunk(e, e->index, e->bufflen); 1362 } 1363 1364 /* 1365 * The only guarantee made about these values is that comparisons 1366 * between them, as well as comparison between multiple calls to these 1367 * functions without modifying the editwin in-between, are meaningful. 1368 */ 1369 1370 int owl_editwin_get_point(owl_editwin *e) 1371 { 1372 return e->index; 1373 } 1374 1375 int owl_editwin_get_mark(owl_editwin *e) 1376 { 1377 return e->mark; 1349 1378 } 1350 1379
Note: See TracChangeset
for help on using the changeset viewer.