Skip to content

Commit

Permalink
simplify comparisons
Browse files Browse the repository at this point in the history
  • Loading branch information
yuuki0xff committed Sep 10, 2019
1 parent 6132e73 commit 9d4c5e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nvpy/nvpy.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ def observer_view_delete_note(self, view, evt_type, evt: events.NoteSelectionCha

# then try to select after the one that is to be deleted
nidx = evt.sel + 1
if nidx >= 0 and nidx < self.view.get_number_of_notes():
if 0 <= nidx < self.view.get_number_of_notes():
self.view.select_note(nidx)

# finally delete the note
Expand Down

0 comments on commit 9d4c5e2

Please sign in to comment.