Changeset cedd33b in mainline
- Timestamp:
- 2009-12-05T17:35:57Z (15 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- bc77bfa
- Parents:
- f1b37d6
- Location:
- uspace/app
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/input.c
rf1b37d6 rcedd33b 90 90 static void tinput_sel_get_bounds(tinput_t *ti, int *sa, int *sb); 91 91 static bool tinput_sel_active(tinput_t *ti); 92 static void tinput_sel_all(tinput_t *ti); 92 93 static void tinput_sel_delete(tinput_t *ti); 93 94 static void tinput_key_ctrl(tinput_t *ti, console_event_t *ev); … … 255 256 size_t off; 256 257 257 ilen = min( str_length(str), INPUT_MAX - ti->nc);258 ilen = min((ssize_t) str_length(str), INPUT_MAX - ti->nc); 258 259 if (ilen == 0) 259 260 return; … … 477 478 } 478 479 480 static void tinput_sel_all(tinput_t *ti) 481 { 482 ti->sel_start = 0; 483 ti->pos = ti->nc; 484 tinput_display_tail(ti, 0, 0); 485 tinput_position_caret(ti); 486 } 487 479 488 static void tinput_sel_delete(tinput_t *ti) 480 489 { … … 654 663 tinput_seek_vertical(ti, seek_forward, false); 655 664 break; 665 case KC_X: 666 tinput_sel_copy_to_cb(ti); 667 tinput_sel_delete(ti); 668 break; 656 669 case KC_C: 657 670 tinput_sel_copy_to_cb(ti); … … 659 672 case KC_V: 660 673 tinput_paste_from_cb(ti); 674 break; 675 case KC_A: 676 tinput_sel_all(ti); 661 677 break; 662 678 default: -
uspace/app/edit/edit.c
rf1b37d6 rcedd33b 135 135 136 136 static bool selection_active(void); 137 static void selection_sel_all(void); 137 138 static void selection_get_points(spt_t *pa, spt_t *pb); 138 139 static void selection_delete(void); … … 335 336 pane.rflags |= REDRAW_TEXT; 336 337 caret_update(); 338 break; 339 case KC_X: 340 selection_copy(); 341 selection_delete(); 342 pane.rflags |= REDRAW_TEXT; 343 caret_update(); 344 break; 345 case KC_A: 346 selection_sel_all(); 337 347 break; 338 348 default: … … 1004 1014 } 1005 1015 1016 static void selection_sel_all(void) 1017 { 1018 spt_t spt, ept; 1019 1020 pt_get_sof(&spt); 1021 pt_get_eof(&ept); 1022 sheet_remove_tag(&doc.sh, &pane.sel_start); 1023 sheet_place_tag(&doc.sh, &spt, &pane.sel_start); 1024 sheet_remove_tag(&doc.sh, &pane.caret_pos); 1025 sheet_place_tag(&doc.sh, &ept, &pane.caret_pos); 1026 1027 pane.rflags |= REDRAW_TEXT; 1028 } 1029 1006 1030 static void selection_copy(void) 1007 1031 {
Note:
See TracChangeset
for help on using the changeset viewer.