File tree Expand file tree Collapse file tree 3 files changed +1
-10
lines changed
Expand file tree Collapse file tree 3 files changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ function M._scroll_to_bottom()
202202 end
203203
204204 if was_at_bottom or not is_focused then
205- require ( ' opencode.ui.ui ' ). scroll_to_bottom ( )
205+ vim . api . nvim_win_set_cursor ( state . windows . output_win , { line_count , 0 } )
206206 end
207207end
208208
Original file line number Diff line number Diff line change @@ -7,11 +7,6 @@ local input_window = require('opencode.ui.input_window')
77local footer = require (' opencode.ui.footer' )
88local topbar = require (' opencode.ui.topbar' )
99
10- function M .scroll_to_bottom ()
11- local line_count = vim .api .nvim_buf_line_count (state .windows .output_buf )
12- vim .api .nvim_win_set_cursor (state .windows .output_win , { line_count , 0 })
13- end
14-
1510--- @param windows OpencodeWindowState
1611function M .close_windows (windows )
1712 if not windows then
Original file line number Diff line number Diff line change @@ -61,7 +61,6 @@ describe('opencode.core', function()
6161 stub (ui , ' render_output' )
6262 stub (ui , ' focus_input' )
6363 stub (ui , ' focus_output' )
64- stub (ui , ' scroll_to_bottom' )
6564 stub (ui , ' is_output_empty' ).returns (true )
6665 stub (session , ' get_last_workspace_session' ).returns ({ id = ' test-session' })
6766 if session .get_by_id and type (session .get_by_id ) == ' function' then
@@ -108,7 +107,6 @@ describe('opencode.core', function()
108107 ' render_output' ,
109108 ' focus_input' ,
110109 ' focus_output' ,
111- ' scroll_to_bottom' ,
112110 ' is_output_empty' ,
113111 }) do
114112 if ui [fn ] and ui [fn ].revert then
@@ -185,8 +183,6 @@ describe('opencode.core', function()
185183 end )
186184 ui .render_output :revert ()
187185 stub (ui , ' render_output' )
188- ui .scroll_to_bottom :revert ()
189- stub (ui , ' scroll_to_bottom' )
190186
191187 state .windows = { input_buf = 1 , output_buf = 2 }
192188 core .select_session (nil )
You can’t perform that action at this time.
0 commit comments