mirror of
https://github.com/qvacua/vimr.git
synced 2024-11-24 03:25:03 +03:00
Resize neovim when resized not by live resizing
This commit is contained in:
parent
670c19043c
commit
4075b49fa7
@ -108,16 +108,24 @@ public class NeoVimView: NSView {
|
||||
Swift.print(self.grid)
|
||||
}
|
||||
|
||||
// override public func setFrameSize(newSize: NSSize) {
|
||||
// super.setFrameSize(newSize)
|
||||
//
|
||||
// // initial resizing is done when grid has data
|
||||
// guard self.grid.hasData else {
|
||||
// return
|
||||
// }
|
||||
//
|
||||
// self.resizeNeoVimUiTo(size: newSize)
|
||||
// }
|
||||
override public func setFrameSize(newSize: NSSize) {
|
||||
super.setFrameSize(newSize)
|
||||
|
||||
// initial resizing is done when grid has data
|
||||
guard self.grid.hasData else {
|
||||
return
|
||||
}
|
||||
|
||||
if self.inLiveResize {
|
||||
// TODO: Turn of live resizing for now.
|
||||
// self.resizeNeoVimUiTo(size: newSize)
|
||||
return
|
||||
}
|
||||
|
||||
// There can be cases where the frame is resized not by live resizing, eg when the window is resized by window
|
||||
// management tools. Thus, we make sure that the resize call is made when this happens.
|
||||
self.resizeNeoVimUiTo(size: newSize)
|
||||
}
|
||||
|
||||
override public func viewDidEndLiveResize() {
|
||||
super.viewDidEndLiveResize()
|
||||
|
Loading…
Reference in New Issue
Block a user