aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/textformat.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/nvim/textformat.c')
-rw-r--r--src/nvim/textformat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/nvim/textformat.c b/src/nvim/textformat.c
index 64cccf5f3f..bfe3ed5972 100644
--- a/src/nvim/textformat.c
+++ b/src/nvim/textformat.c
@@ -763,7 +763,7 @@ int comp_textwidth(bool ff)
// The width is the window width minus 'wrapmargin' minus all the
// things that add to the margin.
textwidth = curwin->w_width_inner - (int)curbuf->b_p_wm;
- if (cmdwin_type != 0) {
+ if (curbuf == cmdwin_buf) {
textwidth -= 1;
}
textwidth -= win_fdccol_count(curwin);