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)
121
121
vim .cmd (string.format (' %dsplit orgagenda' , win_height ))
122
122
vim .cmd ([[ setf orgagenda]] )
123
123
vim .cmd ([[ setlocal buftype=nofile bufhidden=wipe nobuflisted nolist noswapfile nowrap nospell]] )
124
+ vim .w .org_window_pos = vim .fn .win_screenpos (0 )
124
125
config :setup_mappings (' agenda' )
125
126
else
126
- vim .cmd (string.format (' resize %d' , win_height ))
127
127
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
128
134
end
129
135
local lines = vim .tbl_map (function (item )
130
136
return item .line_content
You can’t perform that action at this time.
0 commit comments