diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-28 15:35:52 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | ccd3075cac77044498a8c35d2482c8b4cb8f56e7 (patch) | |
| tree | 54d43d65ad3e8c124c3eb6b9114d240e6b0eccbc /test/hxcases | |
| parent | 122281b0ea3473f8950910765c487ef3fc82e7d4 (diff) | |
| download | pardes-ccd3075cac77044498a8c35d2482c8b4cb8f56e7.tar.gz pardes-ccd3075cac77044498a8c35d2482c8b4cb8f56e7.zip | |
Backspace in a line's leading blanks goes back to the previous indent stop
helix's delete_char_backward dedents: when everything before the cursor on its
line is blank, it deletes back to the previous multiple of the indent width,
a whole unit when already on one (a tab before the cursor still goes alone).
pardes deleted one space, so O<backspace> under an indented line left three
of four, which is where helix-golf's function_into_class ended up.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'test/hxcases')
| -rw-r--r-- | test/hxcases/cases.jsonl | 5 | ||||
| -rw-r--r-- | test/hxcases/goldens.jsonl | 5 | ||||
| -rw-r--r-- | test/hxcases/parity-waivers.jsonl | 1 |
3 files changed, 11 insertions, 0 deletions
diff --git a/test/hxcases/cases.jsonl b/test/hxcases/cases.jsonl index 471d3a6c..cfd82cce 100644 --- a/test/hxcases/cases.jsonl +++ b/test/hxcases/cases.jsonl @@ -355,6 +355,11 @@ {"name": "ins-enter-indent", "pane": "file", "text": " foo\n", "keys": "A<ret>x<esc>"} {"name": "ins-backspace", "pane": "file", "text": "abc\n", "keys": "lli<backspace><esc>"} {"name": "ins-backspace-join", "pane": "file", "text": "ab\ncd\n", "keys": "ji<backspace><esc>"} +{"name": "ins-backspace-indent-unit", "pane": "file", "text": " x\n", "keys": "8li<backspace>"} +{"name": "ins-backspace-indent-partial", "pane": "file", "text": " x\n", "keys": "6li<backspace>"} +{"name": "ins-backspace-indent-tab", "pane": "file", "text": "\t\tx\n", "keys": "2li<backspace>"} +{"name": "ins-backspace-open-indent", "pane": "file", "text": " ab\n", "keys": "O<backspace>"} +{"name": "ins-backspace-after-text", "pane": "file", "text": " a x\n", "keys": "7li<backspace>"} {"name": "ins-ctrl-w", "pane": "file", "text": "one two\n", "keys": "A<C-w><esc>"} {"name": "ins-ctrl-w-col0-join", "pane": "file", "text": "ab\ncd\n", "keys": "ji<C-w><esc>"} {"name": "ins-alt-bs", "pane": "file", "text": "one two\n", "keys": "A<A-backspace><esc>"} diff --git a/test/hxcases/goldens.jsonl b/test/hxcases/goldens.jsonl index 516b2417..e258b485 100644 --- a/test/hxcases/goldens.jsonl +++ b/test/hxcases/goldens.jsonl @@ -355,6 +355,11 @@ {"name":"ins-enter-indent","text":" foo\n x\n","mode":"normal","cursor":{"row":1,"col":5},"anchor":{"row":1,"col":5}} {"name":"ins-backspace","text":"ac\n","mode":"normal","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}} {"name":"ins-backspace-join","text":"abcd\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}} +{"name":"ins-backspace-indent-unit","text":" x\n","mode":"insert","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}} +{"name":"ins-backspace-indent-partial","text":" x\n","mode":"insert","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}} +{"name":"ins-backspace-indent-tab","text":"\tx\n","mode":"insert","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}} +{"name":"ins-backspace-open-indent","text":"\n ab\n","mode":"insert","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}} +{"name":"ins-backspace-after-text","text":" a x\n","mode":"insert","cursor":{"row":0,"col":6},"anchor":{"row":0,"col":6}} {"name":"ins-ctrl-w","text":"one \n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}} {"name":"ins-ctrl-w-col0-join","text":"cd\n","mode":"normal","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}} {"name":"ins-alt-bs","text":"one \n","mode":"normal","cursor":{"row":0,"col":4},"anchor":{"row":0,"col":4}} diff --git a/test/hxcases/parity-waivers.jsonl b/test/hxcases/parity-waivers.jsonl index 39a6a7c9..ad24eaa9 100644 --- a/test/hxcases/parity-waivers.jsonl +++ b/test/hxcases/parity-waivers.jsonl @@ -11,3 +11,4 @@ {"name":"comment-tab-indent","reason":"The terminal expands literal tabs to spaces before editing.","reference":{"name":"comment-tab-indent","text":"\t# alpha\n\t# beta\n","mode":"normal","cursor":{"row":1,"col":7},"anchor":{"row":0,"col":0}},"expected":{"name":"comment-tab-indent","text":" # alpha\n # beta\n","mode":"normal","cursor":{"row":1,"col":14},"anchor":{"row":0,"col":0}}} {"name":"comment-noeol","reason":"Terminal capture restores a trailing newline that the source omits.","reference":{"name":"comment-noeol","text":"# alpha","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}},"expected":{"name":"comment-noeol","text":"# alpha\n","mode":"normal","cursor":{"row":0,"col":2},"anchor":{"row":0,"col":2}}} {"name":"comment-only-blank","reason":"Terminal capture expands tabs and trims trailing blank rows.","reference":{"name":"comment-only-blank","text":" \n\t\n","mode":"normal","cursor":{"row":1,"col":1},"anchor":{"row":0,"col":0}},"expected":{"name":"comment-only-blank","text":" \n","mode":"normal","cursor":{"row":0,"col":3},"anchor":{"row":0,"col":0}}} +{"name":"ins-backspace-indent-tab","reason":"The terminal expands literal tabs to spaces before editing.","reference":{"name":"ins-backspace-indent-tab","text":"\tx\n","mode":"insert","cursor":{"row":0,"col":1},"anchor":{"row":0,"col":1}},"expected":{"name":"ins-backspace-indent-tab","text":" x\n","mode":"insert","cursor":{"row":0,"col":0},"anchor":{"row":0,"col":0}}} |
