@@ -697,37 +697,6 @@ - (void)liveResizeDidEnd
697697 NSConnection *connection = [(NSDistantObject *)proxy connectionForProxy ];
698698 [connection removeRequestMode: NSEventTrackingRunLoopMode ];
699699
700- // NOTE: During live resize messages from MacVim to Vim are often dropped
701- // (because too many messages are sent at once). This may lead to
702- // inconsistent states between Vim and MacVim; to avoid this we send a
703- // synchronous resize message to Vim now (this is not fool-proof, but it
704- // does seem to work quite well).
705- // Do NOT send a SetTextDimensionsMsgID message (as opposed to
706- // LiveResizeMsgID) since then the view is constrained to not be larger
707- // than the screen the window mostly occupies; this makes it impossible to
708- // resize the window across multiple screens.
709-
710- int constrained[2 ];
711- NSSize textViewSize = [[vimView textView ] frame ].size ;
712- [[vimView textView ] constrainRows: &constrained[0 ] columns: &constrained[1 ]
713- toSize: textViewSize];
714-
715- ASLogDebug (@" End of live resize, notify Vim that text dimensions are %d x%d " ,
716- constrained[1 ], constrained[0 ]);
717-
718- NSData *data = [NSData dataWithBytes: constrained length: 2 *sizeof (int )];
719- BOOL sendOk = [vimController sendMessageNow: LiveResizeMsgID
720- data: data
721- timeout: .5 ];
722-
723- if (!sendOk) {
724- // Sending of synchronous message failed. Force the window size to
725- // match the last dimensions received from Vim, otherwise we end up
726- // with inconsistent states.
727- [self resizeWindowToFitContentSize: [vimView desiredSize ]
728- keepOnScreen: NO ];
729- }
730-
731700 // If we saved the original title while resizing, restore it.
732701 if (lastSetTitle != nil ) {
733702 [decoratedWindow setTitle: lastSetTitle];
0 commit comments