parent
43d2e12c0e
commit
cafecda230
|
@ -204,7 +204,8 @@ DisplaySetup Window::compute_display_setup(const Context& context)
|
|||
|
||||
// now ensure the cursor column is visible
|
||||
{
|
||||
auto underflow = setup.cursor_pos.column - setup.scroll_offset.column;
|
||||
auto underflow = std::max(-setup.window_pos.column,
|
||||
setup.cursor_pos.column - setup.scroll_offset.column);
|
||||
if (underflow < 0)
|
||||
{
|
||||
setup.window_pos.column += underflow;
|
||||
|
|
1
test/regression/1741-scrolloff-hides-end-of-lines/cmd
Normal file
1
test/regression/1741-scrolloff-hides-end-of-lines/cmd
Normal file
|
@ -0,0 +1 @@
|
|||
|
|
@ -0,0 +1,6 @@
|
|||
{ "jsonrpc": "2.0", "method": "draw", "params": [[[{ "face": { "fg": "black", "bg": "white", "attributes": [] }, "contents": "0" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "1234567890123456789012345678901234567890123456789012345678901234567890123456789" }]], { "fg": "default", "bg": "default", "attributes": [] }, { "fg": "blue", "bg": "default", "attributes": [] }] }
|
||||
{ "jsonrpc": "2.0", "method": "menu_hide", "params": [] }
|
||||
{ "jsonrpc": "2.0", "method": "info_hide", "params": [] }
|
||||
{ "jsonrpc": "2.0", "method": "draw_status", "params": [[], [{ "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": "out 1:1 " }, { "face": { "fg": "black", "bg": "yellow", "attributes": [] }, "contents": "" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " " }, { "face": { "fg": "blue", "bg": "default", "attributes": [] }, "contents": "1 sel" }, { "face": { "fg": "default", "bg": "default", "attributes": [] }, "contents": " - unnamed0@[kak-tests]" }], { "fg": "cyan", "bg": "default", "attributes": [] }] }
|
||||
{ "jsonrpc": "2.0", "method": "set_cursor", "params": ["buffer", { "line": 0, "column": 0 }] }
|
||||
{ "jsonrpc": "2.0", "method": "refresh", "params": [true] }
|
1
test/regression/1741-scrolloff-hides-end-of-lines/in
Normal file
1
test/regression/1741-scrolloff-hides-end-of-lines/in
Normal file
|
@ -0,0 +1 @@
|
|||
01234567890123456789012345678901234567890123456789012345678901234567890123456789
|
1
test/regression/1741-scrolloff-hides-end-of-lines/rc
Normal file
1
test/regression/1741-scrolloff-hides-end-of-lines/rc
Normal file
|
@ -0,0 +1 @@
|
|||
set global scrolloff 0,20
|
Loading…
Reference in New Issue
Block a user