diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-11-14 03:11:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-11-14 03:11:20 +0300 |
commit | 2549384baaaedfce96157430f1f0a5b44147262f (patch) | |
tree | 9d1699d7684ced07460ba86c0edf66c9d5668095 /source/blender/editors/space_text | |
parent | 73047c69ea803a35f3eb4082b5ccdc7d2c53514d (diff) |
Cleanup: minor tweaks to auto-close
Spelling and failure to reuse variable missed in review.
Diffstat (limited to 'source/blender/editors/space_text')
-rw-r--r-- | source/blender/editors/space_text/text_ops.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/space_text/text_ops.c b/source/blender/editors/space_text/text_ops.c index 3cca1859bbf..08869acdfc6 100644 --- a/source/blender/editors/space_text/text_ops.c +++ b/source/blender/editors/space_text/text_ops.c @@ -87,7 +87,7 @@ static void test_line_start(char c, bool *r_last_state) /** * This function receives a character and returns its closing pair if it exists. - * \param character: Characater to find the closing pair. + * \param character: Character to find the closing pair. * \return The closing pair of the character if it exists. */ static char text_closing_character_pair_get(const char character) @@ -2428,11 +2428,10 @@ static int text_delete_exec(bContext *C, wmOperator *op) } } if (U.text_flag & USER_TEXT_EDIT_AUTO_CLOSE) { - const char *current = text->curl->line + text->curc; - if (*current != '\0') { - const char *prev = BLI_str_find_prev_char_utf8(text->curl->line + text->curc, - text->curl->line); - if (*current == text_closing_character_pair_get(*prev)) { + const char *curr = text->curl->line + text->curc; + if (*curr != '\0') { + const char *prev = BLI_str_find_prev_char_utf8(curr, text->curl->line); + if (*curr == text_closing_character_pair_get(*prev)) { txt_move_right(text, false); txt_backspace_char(text); } |