From 8a92572df505eab170912e082e085301e7fecddd Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 22 Aug 2017 09:50:06 -0700 Subject: 3983 --- html/edit/003-shortcuts.mu.html | 84 ++++++++++++++++++++--------------------- 1 file changed, 42 insertions(+), 42 deletions(-) (limited to 'html/edit/003-shortcuts.mu.html') diff --git a/html/edit/003-shortcuts.mu.html b/html/edit/003-shortcuts.mu.html index d45dfea6..bd31740a 100644 --- a/html/edit/003-shortcuts.mu.html +++ b/html/edit/003-shortcuts.mu.html @@ -114,12 +114,12 @@ if ('onhashchange' in window) { 52 { 53 ¦ tab?:bool <- equal c, 9/tab 54 ¦ break-unless tab? - 55 ¦ <insert-character-begin> + 55 ¦ <begin-insert-character> 56 ¦ # todo: decompose insert-at-cursor into editor update and screen update, 57 ¦ # so that 'tab' doesn't render the current line multiple times 58 ¦ insert-at-cursor editor, 32/space, screen 59 ¦ go-render? <- insert-at-cursor editor, 32/space, screen - 60 ¦ <insert-character-end> + 60 ¦ <end-insert-character> 61 ¦ return 62 } 63 ] @@ -158,9 +158,9 @@ if ('onhashchange' in window) { 96 { 97 ¦ delete-previous-character?:bool <- equal c, 8/backspace 98 ¦ break-unless delete-previous-character? - 99 ¦ <backspace-character-begin> + 99 ¦ <begin-backspace-character> 100 ¦ go-render?:bool, backspaced-cell:&:duplex-list:char <- delete-before-cursor editor, screen - 101 ¦ <backspace-character-end> + 101 ¦ <end-backspace-character> 102 ¦ return 103 } 104 ] @@ -425,9 +425,9 @@ if ('onhashchange' in window) { 363 { 364 ¦ delete-next-character?:bool <- equal k, 65522/delete 365 ¦ break-unless delete-next-character? - 366 ¦ <delete-character-begin> + 366 ¦ <begin-delete-character> 367 ¦ go-render?:bool, deleted-cell:&:duplex-list:char <- delete-at-cursor editor, screen - 368 ¦ <delete-character-end> + 368 ¦ <end-delete-character> 369 ¦ return 370 } 371 ] @@ -501,13 +501,13 @@ if ('onhashchange' in window) { 439 ¦ next-cursor:&:duplex-list:char <- next before-cursor 440 ¦ break-unless next-cursor 441 ¦ # scan to next character - 442 ¦ <move-cursor-begin> + 442 ¦ <begin-move-cursor> 443 ¦ before-cursor <- copy next-cursor 444 ¦ *editor <- put *editor, before-cursor:offset, before-cursor 445 ¦ go-render?:bool <- move-cursor-coordinates-right editor, screen-height 446 ¦ screen <- move-cursor screen, cursor-row, cursor-column 447 ¦ undo-coalesce-tag:num <- copy 2/right-arrow - 448 ¦ <move-cursor-end> + 448 ¦ <end-move-cursor> 449 ¦ return 450 } 451 ] @@ -785,12 +785,12 @@ if ('onhashchange' in window) { 723 ¦ # if not at start of text (before-cursor at § sentinel) 724 ¦ prev:&:duplex-list:char <- prev before-cursor 725 ¦ return-unless prev, 0/don't-render - 726 ¦ <move-cursor-begin> + 726 ¦ <begin-move-cursor> 727 ¦ go-render? <- move-cursor-coordinates-left editor 728 ¦ before-cursor <- copy prev 729 ¦ *editor <- put *editor, before-cursor:offset, before-cursor 730 ¦ undo-coalesce-tag:num <- copy 1/left-arrow - 731 ¦ <move-cursor-end> + 731 ¦ <end-move-cursor> 732 ¦ return 733 } 734 ] @@ -1051,10 +1051,10 @@ if ('onhashchange' in window) { 989 { 990 ¦ move-to-previous-line?:bool <- equal k, 65517/up-arrow 991 ¦ break-unless move-to-previous-line? - 992 ¦ <move-cursor-begin> + 992 ¦ <begin-move-cursor> 993 ¦ go-render? <- move-to-previous-line editor 994 ¦ undo-coalesce-tag:num <- copy 3/up-arrow - 995 ¦ <move-cursor-end> + 995 ¦ <end-move-cursor> 996 ¦ return 997 } 998 ] @@ -1405,10 +1405,10 @@ if ('onhashchange' in window) { 1343 { 1344 ¦ move-to-next-line?:bool <- equal k, 65516/down-arrow 1345 ¦ break-unless move-to-next-line? -1346 ¦ <move-cursor-begin> +1346 ¦ <begin-move-cursor> 1347 ¦ go-render? <- move-to-next-line editor, screen-height 1348 ¦ undo-coalesce-tag:num <- copy 4/down-arrow -1349 ¦ <move-cursor-end> +1349 ¦ <end-move-cursor> 1350 ¦ return 1351 } 1352 ] @@ -1602,10 +1602,10 @@ if ('onhashchange' in window) { 1540 { 1541 ¦ move-to-start-of-line?:bool <- equal c, 1/ctrl-a 1542 ¦ break-unless move-to-start-of-line? -1543 ¦ <move-cursor-begin> +1543 ¦ <begin-move-cursor> 1544 ¦ move-to-start-of-screen-line editor 1545 ¦ undo-coalesce-tag:num <- copy 0/never -1546 ¦ <move-cursor-end> +1546 ¦ <end-move-cursor> 1547 ¦ return 0/don't-render 1548 } 1549 ] @@ -1614,10 +1614,10 @@ if ('onhashchange' in window) { 1552 { 1553 ¦ move-to-start-of-line?:bool <- equal k, 65521/home 1554 ¦ break-unless move-to-start-of-line? -1555 ¦ <move-cursor-begin> +1555 ¦ <begin-move-cursor> 1556 ¦ move-to-start-of-screen-line editor 1557 ¦ undo-coalesce-tag:num <- copy 0/never -1558 ¦ <move-cursor-end> +1558 ¦ <end-move-cursor> 1559 ¦ return 0/don't-render 1560 } 1561 ] @@ -1827,10 +1827,10 @@ if ('onhashchange' in window) { 1765 { 1766 ¦ move-to-end-of-line?:bool <- equal c, 5/ctrl-e 1767 ¦ break-unless move-to-end-of-line? -1768 ¦ <move-cursor-begin> +1768 ¦ <begin-move-cursor> 1769 ¦ move-to-end-of-line editor 1770 ¦ undo-coalesce-tag:num <- copy 0/never -1771 ¦ <move-cursor-end> +1771 ¦ <end-move-cursor> 1772 ¦ return 0/don't-render 1773 } 1774 ] @@ -1839,10 +1839,10 @@ if ('onhashchange' in window) { 1777 { 1778 ¦ move-to-end-of-line?:bool <- equal k, 65520/end 1779 ¦ break-unless move-to-end-of-line? -1780 ¦ <move-cursor-begin> +1780 ¦ <begin-move-cursor> 1781 ¦ move-to-end-of-line editor 1782 ¦ undo-coalesce-tag:num <- copy 0/never -1783 ¦ <move-cursor-end> +1783 ¦ <end-move-cursor> 1784 ¦ return 0/don't-render 1785 } 1786 ] @@ -2022,9 +2022,9 @@ if ('onhashchange' in window) { 1960 { 1961 ¦ delete-to-start-of-line?:bool <- equal c, 21/ctrl-u 1962 ¦ break-unless delete-to-start-of-line? -1963 ¦ <delete-to-start-of-line-begin> +1963 ¦ <begin-delete-to-start-of-line> 1964 ¦ deleted-cells:&:duplex-list:char <- delete-to-start-of-line editor -1965 ¦ <delete-to-start-of-line-end> +1965 ¦ <end-delete-to-start-of-line> 1966 ¦ go-render?:bool <- minimal-render-for-ctrl-u screen, editor, deleted-cells 1967 ¦ return 1968 } @@ -2599,9 +2599,9 @@ if ('onhashchange' in window) { 2537 { 2538 ¦ delete-to-end-of-line?:bool <- equal c, 11/ctrl-k 2539 ¦ break-unless delete-to-end-of-line? -2540 ¦ <delete-to-end-of-line-begin> +2540 ¦ <begin-delete-to-end-of-line> 2541 ¦ deleted-cells:&:duplex-list:char <- delete-to-end-of-line editor -2542 ¦ <delete-to-end-of-line-end> +2542 ¦ <end-delete-to-end-of-line> 2543 ¦ # checks if we can do a minimal render and if we can it will do a minimal render 2544 ¦ go-render?:bool <- minimal-render-for-ctrl-k screen, editor, deleted-cells 2545 ¦ return @@ -3629,10 +3629,10 @@ if ('onhashchange' in window) { 3567 ¦ page-down?:bool <- equal c, 6/ctrl-f 3568 ¦ break-unless page-down? 3569 ¦ old-top:&:duplex-list:char <- get *editor, top-of-screen:offset -3570 ¦ <move-cursor-begin> +3570 ¦ <begin-move-cursor> 3571 ¦ page-down editor 3572 ¦ undo-coalesce-tag:num <- copy 0/never -3573 ¦ <move-cursor-end> +3573 ¦ <end-move-cursor> 3574 ¦ top-of-screen:&:duplex-list:char <- get *editor, top-of-screen:offset 3575 ¦ movement?:bool <- not-equal top-of-screen, old-top 3576 ¦ return movement?/go-render @@ -3644,10 +3644,10 @@ if ('onhashchange' in window) { 3582 ¦ page-down?:bool <- equal k, 65518/page-down 3583 ¦ break-unless page-down? 3584 ¦ old-top:&:duplex-list:char <- get *editor, top-of-screen:offset -3585 ¦ <move-cursor-begin> +3585 ¦ <begin-move-cursor> 3586 ¦ page-down editor 3587 ¦ undo-coalesce-tag:num <- copy 0/never -3588 ¦ <move-cursor-end> +3588 ¦ <end-move-cursor> 3589 ¦ top-of-screen:&:duplex-list:char <- get *editor, top-of-screen:offset 3590 ¦ movement?:bool <- not-equal top-of-screen, old-top 3591 ¦ return movement?/go-render @@ -3853,10 +3853,10 @@ if ('onhashchange' in window) { 3791 ¦ page-up?:bool <- equal c, 2/ctrl-b 3792 ¦ break-unless page-up? 3793 ¦ old-top:&:duplex-list:char <- get *editor, top-of-screen:offset -3794 ¦ <move-cursor-begin> +3794 ¦ <begin-move-cursor> 3795 ¦ editor <- page-up editor, screen-height 3796 ¦ undo-coalesce-tag:num <- copy 0/never -3797 ¦ <move-cursor-end> +3797 ¦ <end-move-cursor> 3798 ¦ top-of-screen:&:duplex-list:char <- get *editor, top-of-screen:offset 3799 ¦ movement?:bool <- not-equal top-of-screen, old-top 3800 ¦ return movement?/go-render @@ -3868,10 +3868,10 @@ if ('onhashchange' in window) { 3806 ¦ page-up?:bool <- equal k, 65519/page-up 3807 ¦ break-unless page-up? 3808 ¦ old-top:&:duplex-list:char <- get *editor, top-of-screen:offset -3809 ¦ <move-cursor-begin> +3809 ¦ <begin-move-cursor> 3810 ¦ editor <- page-up editor, screen-height 3811 ¦ undo-coalesce-tag:num <- copy 0/never -3812 ¦ <move-cursor-end> +3812 ¦ <end-move-cursor> 3813 ¦ top-of-screen:&:duplex-list:char <- get *editor, top-of-screen:offset 3814 ¦ movement?:bool <- not-equal top-of-screen, old-top 3815 ¦ # don't bother re-rendering if nothing changed. todo: test this @@ -4200,10 +4200,10 @@ if ('onhashchange' in window) { 4138 { 4139 ¦ scroll-up?:bool <- equal c, 19/ctrl-s 4140 ¦ break-unless scroll-up? -4141 ¦ <move-cursor-begin> +4141 ¦ <begin-move-cursor> 4142 ¦ go-render?:bool, editor <- line-up editor, screen-height 4143 ¦ undo-coalesce-tag:num <- copy 5/line-up -4144 ¦ <move-cursor-end> +4144 ¦ <end-move-cursor> 4145 ¦ return go-render? 4146 } 4147 ] @@ -4231,10 +4231,10 @@ if ('onhashchange' in window) { 4169 { 4170 ¦ scroll-down?:bool <- equal c, 24/ctrl-x 4171 ¦ break-unless scroll-down? -4172 ¦ <move-cursor-begin> +4172 ¦ <begin-move-cursor> 4173 ¦ go-render?:bool, editor <- line-down editor, screen-height 4174 ¦ undo-coalesce-tag:num <- copy 6/line-down -4175 ¦ <move-cursor-end> +4175 ¦ <end-move-cursor> 4176 ¦ return go-render? 4177 } 4178 ] @@ -4259,7 +4259,7 @@ if ('onhashchange' in window) { 4197 { 4198 ¦ scroll-down?:bool <- equal c, 20/ctrl-t 4199 ¦ break-unless scroll-down? -4200 ¦ <move-cursor-begin> +4200 ¦ <begin-move-cursor> 4201 ¦ old-top:&:duplex-list:char <- get *editor, top-of-screen:offset 4202 ¦ cursor:&:duplex-list:char <- get *editor, before-cursor:offset 4203 ¦ cursor <- next cursor @@ -4268,7 +4268,7 @@ if ('onhashchange' in window) { 4206 ¦ *editor <- put *editor, cursor-row:offset, 1 4207 ¦ go-render?:bool <- not-equal new-top, old-top 4208 ¦ undo-coalesce-tag:num <- copy 0/never -4209 ¦ <move-cursor-end> +4209 ¦ <end-move-cursor> 4210 ¦ return go-render? 4211 } 4212 ] @@ -4281,7 +4281,7 @@ if ('onhashchange' in window) { 4219 ¦ break-unless comment-toggle? 4220 ¦ cursor-column:num <- get *editor, cursor-column:offset 4221 ¦ data:&:duplex-list:char <- get *editor, data:offset -4222 ¦ <insert-character-begin> +4222 ¦ <begin-insert-character> 4223 ¦ before-line-start:&:duplex-list:char <- before-start-of-screen-line editor 4224 ¦ line-start:&:duplex-list:char <- next before-line-start 4225 ¦ commented-out?:bool <- match line-start, [#? ] # comment prefix @@ -4301,7 +4301,7 @@ if ('onhashchange' in window) { 4239 ¦ ¦ *editor <- put *editor, cursor-column:offset, cursor-column 4240 ¦ ¦ go-render? <- render-line-from-start screen, editor, 0 4241 ¦ } -4242 ¦ <insert-character-end> +4242 ¦ <end-insert-character> 4243 ¦ return 4244 } 4245 ] -- cgit 1.4.1-2-gfad0