File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -121,10 +121,16 @@ function Agenda:_render(skip_rebuild)
121121 vim .cmd (string.format (' %dsplit orgagenda' , win_height ))
122122 vim .cmd ([[ setf orgagenda]] )
123123 vim .cmd ([[ setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap nospell]] )
124+ vim .w .org_window_pos = vim .fn .win_screenpos (0 )
124125 config :setup_mappings (' agenda' )
125126 else
126- vim .cmd (string.format (' resize %d' , win_height ))
127127 vim .cmd (vim .fn .win_id2win (opened ) .. ' wincmd w' )
128+ if vim .w .org_window_pos and vim .deep_equal (vim .fn .win_screenpos (0 ), vim .w .org_window_pos ) then
129+ vim .cmd (string.format (' resize %d' , win_height ))
130+ vim .w .org_window_pos = vim .fn .win_screenpos (0 )
131+ else
132+ vim .w .org_window_pos = nil
133+ end
128134 end
129135 local lines = vim .tbl_map (function (item )
130136 return item .line_content
You can’t perform that action at this time.
0 commit comments