aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-26 20:25:51 -0400
committerJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2019-06-26 20:39:24 -0400
commit59b35d6a10bed9bd789274b6f1fe15de7c9c2bd9 (patch)
tree4720fa235d8d662b2e8505abc1eecb066239b783 /src
parenta924650d986be67a40085a7db5d52e6710db9d1e (diff)
downloadrneovim-59b35d6a10bed9bd789274b6f1fe15de7c9c2bd9.tar.gz
rneovim-59b35d6a10bed9bd789274b6f1fe15de7c9c2bd9.tar.bz2
rneovim-59b35d6a10bed9bd789274b6f1fe15de7c9c2bd9.zip
vim-patch:8.0.0935: cannot recognize a terminal buffer in :ls output
Problem: Cannot recognize a terminal buffer in :ls output. Solution: Use R for a running job and F for a finished job. https://github.com/vim/vim/commit/304b64c9e6957fa3f552e0540ca786139b39a1c4
Diffstat (limited to 'src')
-rw-r--r--src/nvim/buffer.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/nvim/buffer.c b/src/nvim/buffer.c
index cae053f015..6a2c06b91f 100644
--- a/src/nvim/buffer.c
+++ b/src/nvim/buffer.c
@@ -2605,14 +2605,22 @@ void buflist_list(exarg_T *eap)
continue;
}
+ const int changed_char = (buf->b_flags & BF_READERR)
+ ? 'x'
+ : (bufIsChanged(buf) ? '+' : ' ');
+ const int ro_char = !MODIFIABLE(buf)
+ ? '-'
+ : (buf->b_p_ro ? '=' : ' ');
+
msg_putchar('\n');
- len = vim_snprintf((char *)IObuff, IOSIZE - 20, "%3d%c%c%c%c%c \"%s\"",
+ len = vim_snprintf(
+ (char *)IObuff, IOSIZE - 20, "%3d%c%c%c%c%c \"%s\"",
buf->b_fnum,
buf->b_p_bl ? ' ' : 'u',
buf == curbuf ? '%' : (curwin->w_alt_fnum == buf->b_fnum ? '#' : ' '),
buf->b_ml.ml_mfp == NULL ? ' ' : (buf->b_nwindows == 0 ? 'h' : 'a'),
- !MODIFIABLE(buf) ? '-' : (buf->b_p_ro ? '=' : ' '),
- (buf->b_flags & BF_READERR) ? 'x' : (bufIsChanged(buf) ? '+' : ' '),
+ ro_char,
+ changed_char,
NameBuff);
if (len > IOSIZE - 20) {