Skip to content

Commit

Permalink
texteditor: fix being able to select invalid line
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBoot committed Sep 9, 2016
1 parent 18d8e4a commit 3b17b60
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion text.c
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,8 @@ int textViewer(char *file) {
} else if (hold_buttons & SCE_CTRL_DOWN || hold2_buttons & SCE_CTRL_LEFT_ANALOG_DOWN) {
if (offset_list[rel_pos + 1] < size) {
if ((rel_pos + 1) < MAX_POSITION) {
rel_pos++;
if (base_pos + rel_pos < n_lines - 1)
rel_pos++;
} else {
if (offset_list[base_pos + rel_pos + 1] < size) {
base_pos++;
Expand Down

0 comments on commit 3b17b60

Please sign in to comment.