Commit Graph

10 Commits

Author SHA1 Message Date
29e6b46135 tmux:textobjs:TODO: Merge all get_var calls
I want to minimize the needed calls to `tmux` to 2.
2024-09-04 16:38:52 +02:00
ec417a439c tmux:textobjs: Merge all copy-mode commands
`copy_exec` was stupid since it brought unnecessary shell overhead even
though it was meant to improve performance (one could argue that it is
not even necessary here).

Continue the idea of reducing calls to `tmux` by "globally" chaining
together all copy-mode commands instead of doing it only "locally" with
`copy_exec`. This has the added benefit that also calls having arguments
can be included and merged.
2024-09-04 16:38:52 +02:00
882ce0de93 tmux:textobjs: Reduce calls to tmux
Put multiple commands together in one tmux call instead of calling it
every time.
2024-09-04 16:38:52 +02:00
267814f075 tmux:textobjs: Fix faulty UTF-8 handling by cut 2024-09-04 08:00:40 +02:00
7e25fed27c tmux:textobjs: Implement more objects (`,[,(,<,{) 2024-09-04 08:00:40 +02:00
48536921d7 tmux:textobjs:TODO: Fix non-ASCII characters 2024-08-30 18:14:19 +02:00
1e4934989b tmux:textobjs: Do nothing when sitting on a space
When the cursor sits on a space character on `iw`, vim does nothing.
2024-08-30 18:14:19 +02:00
c106639a30 tmux:textobjs: Fix word & WORD edge cases 2024-08-30 18:14:19 +02:00
120285c478 tmux:textobjs: Do not use scroll_region
scroll_region_{upper,lower} are only modified by the DECSTBM escape
sequence:

> This control function sets the top and bottom margins for the current
> page. You cannot perform scrolling outside the margins.

And are 0 and pane_height - 1 otherwise. Tmux implements these such that
command output can't be displayed outside these margins, but the cursor
in copy-mode can. This means that using them to check if the cursor is
at the very top or bottom can break in certain situation (even those
seem extremely rare since I have never heard of this escape sequence).

Get rid of them and just use 0 and the pane height.

[1]: https://vt100.net/docs/vt510-rm/DECSTBM.html
2024-07-05 14:26:05 +02:00
7565ae2f6f tmux: Move textobj simulation into own textobjs.sh 2024-07-05 14:26:04 +02:00