File tree Expand file tree Collapse file tree 4 files changed +6
-5
lines changed
Expand file tree Collapse file tree 4 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -302,7 +302,7 @@ events.connect(events.APPLEEVENT_ODOC,
302302
303303-- Sets buffer statusbar text.
304304events .connect (events .UPDATE_UI , function (updated )
305- if updated & 3 == 0 then return end -- ignore scrolling
305+ if not updated or updated & 3 == 0 then return end -- ignore scrolling
306306 local text = not CURSES and ' %s %d/%d %s %d %s %s %s %s' or
307307 ' %s %d/%d %s %d %s %s %s %s'
308308 local pos = buffer .current_pos
Original file line number Diff line number Diff line change @@ -551,7 +551,7 @@ end, 1)
551551
552552-- Highlights matching braces.
553553events .connect (events .UPDATE_UI , function (updated )
554- if updated & 3 == 0 then return end -- ignore scrolling
554+ if not updated or updated & 3 == 0 then return end -- ignore scrolling
555555 if brace_matches [buffer .char_at [buffer .current_pos ]] then
556556 local match = buffer :brace_match (buffer .current_pos , 0 )
557557 local f = match ~= - 1 and view .brace_highlight or view .brace_bad_light
563563
564564-- Highlight all instances of the current or selected word.
565565events .connect (events .UPDATE_UI , function (updated )
566- if updated & buffer .UPDATE_SELECTION == 0 or ui .find .active then return end
566+ if not updated or updated & buffer .UPDATE_SELECTION == 0 or ui .find .active then return end
567567 if M .highlight_words == M .HIGHLIGHT_NONE then return end
568568 buffer .indicator_current = M .INDIC_HIGHLIGHT
569569 buffer :indicator_clear_range (1 , buffer .length )
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ local function deselect()
2424 buffer :set_empty_selection (buffer ._deselect_pos )
2525end
2626events .connect (events .UPDATE_UI , function (updated )
27- if updated & 3 > 0 and buffer .selection_empty then buffer ._deselect_pos = buffer .current_pos end
27+ if not updated or updated & 3 == 0 or not buffer .selection_empty then return end
28+ buffer ._deselect_pos = buffer .current_pos
2829end )
2930--- Wrapper around `buffer:upper_case()` and `buffer:lower_case()`.
3031local function change_case (upper )
Original file line number Diff line number Diff line change @@ -747,7 +747,7 @@ setmetatable(M,
747747-- Update snippet transforms when text is added or deleted.
748748events .connect (events .UPDATE_UI , function (updated )
749749 if not active_snippet then return end
750- if updated & buffer .UPDATE_CONTENT > 0 then active_snippet :update_transforms () end
750+ if updated and updated & buffer .UPDATE_CONTENT > 0 then active_snippet :update_transforms () end
751751 if # keys .keychain == 0 then ui .statusbar_text = _L [' Snippet active' ] end
752752end )
753753
You can’t perform that action at this time.
0 commit comments