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,
302
302
303
303
-- Sets buffer statusbar text.
304
304
events .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
306
306
local text = not CURSES and ' %s %d/%d %s %d %s %s %s %s' or
307
307
' %s %d/%d %s %d %s %s %s %s'
308
308
local pos = buffer .current_pos
Original file line number Diff line number Diff line change @@ -551,7 +551,7 @@ end, 1)
551
551
552
552
-- Highlights matching braces.
553
553
events .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
555
555
if brace_matches [buffer .char_at [buffer .current_pos ]] then
556
556
local match = buffer :brace_match (buffer .current_pos , 0 )
557
557
local f = match ~= - 1 and view .brace_highlight or view .brace_bad_light
563
563
564
564
-- Highlight all instances of the current or selected word.
565
565
events .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
567
567
if M .highlight_words == M .HIGHLIGHT_NONE then return end
568
568
buffer .indicator_current = M .INDIC_HIGHLIGHT
569
569
buffer :indicator_clear_range (1 , buffer .length )
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ local function deselect()
24
24
buffer :set_empty_selection (buffer ._deselect_pos )
25
25
end
26
26
events .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
28
29
end )
29
30
--- Wrapper around `buffer:upper_case()` and `buffer:lower_case()`.
30
31
local function change_case (upper )
Original file line number Diff line number Diff line change @@ -747,7 +747,7 @@ setmetatable(M,
747
747
-- Update snippet transforms when text is added or deleted.
748
748
events .connect (events .UPDATE_UI , function (updated )
749
749
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
751
751
if # keys .keychain == 0 then ui .statusbar_text = _L [' Snippet active' ] end
752
752
end )
753
753
You can’t perform that action at this time.
0 commit comments