Skip to content

Commit

Permalink
Merge pull request #2397 from Wang-Yue/patch-6
Browse files Browse the repository at this point in the history
return 0 when pos is not a valid tab character for removeTab
  • Loading branch information
nesbox authored Dec 10, 2023
2 parents f8297d2 + da4a4f7 commit 5b43a49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/studio/editors/code.c
Original file line number Diff line number Diff line change
Expand Up @@ -1511,7 +1511,7 @@ static s32 insertTab(Code* code, char* line_start, char* pos) {
}
}

//has no effect is pos is not a valid tab character
//has no effect if pos is not a valid tab character
static s32 removeTab(Code* code, char* line_start, char* pos) {
if (useSpacesForTab(code)) {
s32 tab_size = getConfig(code->studio)->options.tabSize;
Expand All @@ -1529,6 +1529,7 @@ static s32 removeTab(Code* code, char* line_start, char* pos) {
deleteCode(code, pos, pos+1);
return 1;
}
return 0;
}

static void doTab(Code* code, bool shift, bool crtl)
Expand Down

0 comments on commit 5b43a49

Please sign in to comment.