File tree 2 files changed +10
-6
lines changed
2 files changed +10
-6
lines changed Original file line number Diff line number Diff line change 147
147
148
148
function M :update ()
149
149
if self .buf and vim .api .nvim_buf_is_valid (self .buf ) then
150
- vim .bo [self .buf ].modifiable = true
151
- local view = vim .api .nvim_win_call (self .view .win , vim .fn .winsaveview )
152
150
self .render :update ()
153
- vim .api .nvim_win_call (self .view .win , function ()
154
- vim .fn .winrestview (view )
155
- end )
156
- vim .bo [self .buf ].modifiable = false
157
151
vim .cmd .redraw ()
158
152
end
159
153
end
Original file line number Diff line number Diff line change @@ -74,7 +74,17 @@ function M:update()
74
74
end
75
75
76
76
self :trim ()
77
+
78
+ vim .bo [self .view .buf ].modifiable = true
79
+ local view = vim .api .nvim_win_call (self .view .win , vim .fn .winsaveview )
80
+
77
81
self :render (self .view .buf )
82
+
83
+ vim .api .nvim_win_call (self .view .win , function ()
84
+ vim .fn .winrestview (view )
85
+ end )
86
+ vim .bo [self .view .buf ].modifiable = false
87
+
78
88
vim .diagnostic .set (
79
89
Config .ns ,
80
90
self .view .buf ,
You can’t perform that action at this time.
0 commit comments