You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When launching a program and passing it the scrollback buffer (e.g. to copy text to selection via keyboard), to scroll the editor identically to the terminal, the variable @scrolled-by can be passed on the commandline of the executed program.
This only works correctly, though, when the editor counts lines the same way as the terminal. It seems @scrolled-by counts screen lines, but editors tend to count lines of the passed text (effectively the number of newline characters). With unicode, double-width characters and such, the translation between these line counts is far from trivial to do in a wrapper script.
Sure, one can use --stdin-add-line-wrap-markers, but for copying multi-line text, this is not desirable.
Thus I think adding variables that allow to pass "topmost text line on the screen" and "bottommost text line on the screen" (with respect to the current scrolling) would be useful to have.
The text was updated successfully, but these errors were encountered:
I also encountered this issue when using the custom pager feature.
Due to the differences between the pager program and the kitty scrollback in terms of counting lines and handling Unicode characters, it is impossible to accurately locate the line at the start of the screen.
When launching a program and passing it the scrollback buffer (e.g. to copy text to selection via keyboard), to scroll the editor identically to the terminal, the variable
@scrolled-by
can be passed on the commandline of the executed program.This only works correctly, though, when the editor counts lines the same way as the terminal. It seems
@scrolled-by
counts screen lines, but editors tend to count lines of the passed text (effectively the number of newline characters). With unicode, double-width characters and such, the translation between these line counts is far from trivial to do in a wrapper script.Sure, one can use
--stdin-add-line-wrap-markers
, but for copying multi-line text, this is not desirable.Thus I think adding variables that allow to pass "topmost text line on the screen" and "bottommost text line on the screen" (with respect to the current scrolling) would be useful to have.
The text was updated successfully, but these errors were encountered: