- Timestamp:
- Jul 11, 2009, 1:14:36 PM (16 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:
- cf26b72
- Parents:
- 0190c4d
- git-author:
- Nelson Elhage <nelhage@mit.edu> (06/20/09 23:45:56)
- git-committer:
- Nelson Elhage <nelhage@mit.edu> (07/11/09 13:14:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
editwin.c
r19a023f ra88f35a 9 9 #define VALID_EXCURSION (0x9a2b4729) 10 10 11 typedef struct oe_excursion_struct{ /*noproto*/11 typedef struct _owl_editwin_excursion { /*noproto*/ 12 12 int valid; 13 13 int index; … … 15 15 int goal_column; 16 16 int lock; 17 struct oe_excursion_struct*next;17 struct _owl_editwin_excursion *next; 18 18 } oe_excursion; 19 19 … … 365 365 oe_release_excursion(e, x); 366 366 } 367 } 368 369 /* External interface to oe_save_excursion */ 370 owl_editwin_excursion *owl_editwin_begin_excursion(owl_editwin *e) 371 { 372 owl_editwin_excursion *x = owl_malloc(sizeof *x); 373 oe_save_excursion(e, x); 374 return x; 375 } 376 377 void owl_editwin_end_excursion(owl_editwin *e, owl_editwin_excursion *x) 378 { 379 oe_restore_excursion(e, x); 380 owl_free(x); 367 381 } 368 382 … … 565 579 } 566 580 581 int owl_editwin_replace_region(owl_editwin *e, char *s) 582 { 583 oe_excursion x; 584 oe_save_excursion(e, &x); 585 int ret; 586 587 if(e->index > e->mark) { 588 owl_editwin_exchange_point_and_mark(e); 589 } 590 591 ret = owl_editwin_replace_internal(e, e->mark - e->index, s); 592 593 oe_restore_excursion(e, &x); 594 595 return ret; 596 } 597 567 598 /* replace 'replace' characters at the point with s, returning the change in size */ 568 599 int owl_editwin_replace(owl_editwin *e, int replace, char *s)
Note: See TracChangeset
for help on using the changeset viewer.