- Timestamp:
- Aug 4, 2002, 6:12:28 PM (22 years ago)
- Branches:
- master, barnowl_perlaim, debian, owl, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 8509c08
- Parents:
- aa2f33b3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
editwin.c
r10b866d rf2e36b5 368 368 } 369 369 370 void owl_editwin_transpose_chars(owl_editwin *e) { 371 /* Swap the character at point with the character at point-1 and 372 * advance the pointer. If point is at beginning of buffer do 373 * nothing. If point is after the last character swap point-1 with 374 * point-2. (Behaves as observed in tcsh and emacs). 375 */ 376 377 int z; 378 char tmp; 379 380 if (e->bufflen==0) return; 381 382 /* get the cursor point */ 383 z=_owl_editwin_get_index_from_xy(e); 384 385 if (z==e->bufflen) { 386 /* point is after last character */ 387 z--; 388 } 389 390 if (z-1 < e->lock) { 391 /* point is at beginning of buffer, do nothing */ 392 return; 393 } 394 395 tmp=e->buff[z]; 396 e->buff[z]=e->buff[z-1]; 397 e->buff[z-1]=tmp; 398 owl_editwin_key_right(e); 399 } 400 370 401 void owl_editwin_insert_string(owl_editwin *e, char *string) { 371 402 /* insert 'string' at the current point, later text is shifted
Note: See TracChangeset
for help on using the changeset viewer.