Changeset e9bb404
- Timestamp:
- Aug 20, 2008, 2:16:30 AM (16 years ago)
- Branches:
- master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
- Children:
- 5987370
- Parents:
- 0504f63
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
editwin.c
r2d4ff14 re9bb404 330 330 { 331 331 int i, z; 332 332 333 333 if ((e->bufflen + n) > (e->allocated - 5)) { 334 334 _owl_editwin_addspace(e); 335 335 } 336 336 337 z = _owl_editwin_get_index_from_xy(e); 338 339 if(z != e->bufflen) { 340 for (i = e->bufflen + n - 1; i > z; i--) { 341 e->buff[i] = e->buff[i - n]; 342 } 343 } 344 337 345 e->bufflen += n; 338 346 e->buff[e->bufflen] = '\0'; 339 340 z = _owl_editwin_get_index_from_xy(e); 341 for (i = e->bufflen - 1; i > z; i--) { 342 e->buff[i] = e->buff[i - n]; 343 } 347 344 348 } 345 349 … … 426 430 427 431 /* shift all the other characters right */ 428 if (z != e->bufflen) { 429 _owl_editwin_insert_bytes(e, len); 430 } 432 _owl_editwin_insert_bytes(e, len); 431 433 432 434 /* insert the new character */ … … 435 437 } 436 438 437 /* housekeeping */438 e->bufflen += len;439 e->buff[e->bufflen] = '\0';440 441 439 /* advance the cursor */ 442 440 z += len;
Note: See TracChangeset
for help on using the changeset viewer.