mirror of
https://github.com/vim/vim.git
synced 2025-09-27 04:14:06 -04:00
patch 9.0.1166: code is indented more than necessary
Problem: Code is indented more than necessary. Solution: Use an early return where it makes sense. (Yegappan Lakshmanan, closes #11792)
This commit is contained in:
committed by
Bram Moolenaar
parent
765d82a657
commit
1cfb14aa97
12
src/edit.c
12
src/edit.c
@@ -2970,12 +2970,12 @@ get_last_insert_save(void)
|
||||
if (last_insert == NULL)
|
||||
return NULL;
|
||||
s = vim_strsave(last_insert + last_insert_skip);
|
||||
if (s != NULL)
|
||||
{
|
||||
len = (int)STRLEN(s);
|
||||
if (len > 0 && s[len - 1] == ESC) // remove trailing ESC
|
||||
s[len - 1] = NUL;
|
||||
}
|
||||
if (s == NULL)
|
||||
return NULL;
|
||||
|
||||
len = (int)STRLEN(s);
|
||||
if (len > 0 && s[len - 1] == ESC) // remove trailing ESC
|
||||
s[len - 1] = NUL;
|
||||
return s;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user