Skip to content

Commit

Permalink
fed: Don't crash after ggdG
Browse files Browse the repository at this point in the history
  • Loading branch information
meithecatte committed Mar 12, 2023
1 parent de989a9 commit a71fd47
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions files/fed.fth
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ defer modeline
: handle-key key to keypress ['] current-keymap catch
dup if status red execute end-status else drop then ;
: modeline? need-status @ if status modeline end-status then ;
: edit-loop decimal begin render handle-key modeline? again ;
: edit-loop decimal begin render handle-key ensure-eol modeline? again ;
: quit-editor clrscr quit ; >> char Q bind normal

( modeline )
Expand Down Expand Up @@ -281,7 +281,7 @@ keymap insert insert-char
1- 1 delete-range else drop then ;
>> char X bind normal
>> #bs bind insert
: delete-after ( -- ) >pos 1 delete-range ensure-eol ;
: delete-after ( -- ) >pos 1 delete-range ;
>> char x bind normal
: enter ( -- ) #lf (insert-char) down lbegin ;
>> #cr bind insert
Expand Down Expand Up @@ -328,7 +328,7 @@ variable paste-linewise
row @ 1+ >line
else
>pos 1+
then paste-at ensure-eol ;
then paste-at ;
>> char p bind normal

( turn a byte position into row,col again )
Expand Down

0 comments on commit a71fd47

Please sign in to comment.