diff options
Diffstat (limited to 'src/nvim')
-rw-r--r-- | src/nvim/drawscreen.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/drawscreen.c b/src/nvim/drawscreen.c index ca70c1f4ef..adbe0f473f 100644 --- a/src/nvim/drawscreen.c +++ b/src/nvim/drawscreen.c @@ -735,9 +735,9 @@ int win_get_bordertext_col(int total_col, int text_width, AlignTextPos align) case kAlignLeft: return 1; case kAlignCenter: - return (total_col - text_width) / 2 + 1; + return MAX((total_col - text_width) / 2 + 1, 1); case kAlignRight: - return total_col - text_width + 1; + return MAX(total_col - text_width + 1, 1); } UNREACHABLE; } |