diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2025-01-22 15:51:08 -0800 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2025-01-22 15:51:08 -0800 |
commit | 3b4df38732ee66b20e481ea683a64cf4e9f4f500 (patch) | |
tree | 8f16dc202a5a015dec5af4e486ed828f508618da | |
parent | 40ac3dd75b43489f3796dce7679283d552347067 (diff) | |
parent | c17ea5543942217a930864e277764f2e2e8d64c0 (diff) | |
download | view.love-3b4df38732ee66b20e481ea683a64cf4e9f4f500.tar.gz |
Merge lines.love
-rw-r--r-- | source_edit.lua | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source_edit.lua b/source_edit.lua index a8dd682..91bcb58 100644 --- a/source_edit.lua +++ b/source_edit.lua @@ -143,13 +143,13 @@ end function edit.put_cursor_on_next_text_line(State) local line = State.cursor1.line - while line < #State.lines do + if State.lines[line].mode == 'text' then return end + while line <= #State.lines and State.lines[line].mode ~= 'text' do line = line+1 - if State.lines[line].mode == 'text' then - State.cursor1.line = line - State.cursor1.pos = 1 - break - end + end + if line <= #State.lines and State.lines[line].mode == 'text' then + State.cursor1.line = line + State.cursor1.pos = 1 end end |