From 3343beb1c943137dc61c16478d7ddc15336a3b5c Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 18 Apr 2019 00:36:36 -0400 Subject: Do not emit an `events.SAVE_POINT_LEFT` event for unfocused views. Forcing a switch to and from the source buffer's view triggers "switch" view events, which can cause trouble. There's no need to know this in real-time and `buffer.modified` can be checked in an `events.BUFFER_AFTER_SWITCH` or `events.VIEW_AFTER_SWITCH` handler. --- src/textadept.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'src/textadept.c') diff --git a/src/textadept.c b/src/textadept.c index d08b4955..998a45c7 100644 --- a/src/textadept.c +++ b/src/textadept.c @@ -1900,10 +1900,6 @@ static void s_notify(Scintilla *view, int _, void *lParam, void*__) { if (focused_view == view || n->nmhdr.code == SCN_URIDROPPED) { if (focused_view != view) goto_view(view); lL_notify(lua, n); - } else if (n->nmhdr.code == SCN_SAVEPOINTLEFT) { - Scintilla *prev = focused_view; - // Do not let a split view steal focus. - goto_view(view), lL_notify(lua, n), goto_view(prev); } else if (n->nmhdr.code == SCN_FOCUSIN) goto_view(view); } -- cgit v1.2.3