Mercurial > vim
comparison src/option.c @ 11912:22658e33203f v8.0.0836
patch 8.0.0836: can abandon a terminal buffer after making a change
commit https://github.com/vim/vim/commit/20e6cd07baed8992e7a509ccef7f111ffcded44d
Author: Bram Moolenaar <Bram@vim.org>
Date: Tue Aug 1 20:25:22 2017 +0200
patch 8.0.0836: can abandon a terminal buffer after making a change
Problem: When a terminal buffer is changed it can still be accidentally
abandoned.
Solution: When making a change reset the 'buftype' option.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Tue, 01 Aug 2017 20:30:04 +0200 |
parents | 318ae82d8ba4 |
children | 92a86fe8adc0 |
comparison
equal
deleted
inserted
replaced
11911:85ff8fc2ab94 | 11912:22658e33203f |
---|---|
8226 /* when 'modifiable' is changed, redraw the window title */ | 8226 /* when 'modifiable' is changed, redraw the window title */ |
8227 else if ((int *)varp == &curbuf->b_p_ma) | 8227 else if ((int *)varp == &curbuf->b_p_ma) |
8228 { | 8228 { |
8229 # ifdef FEAT_TERMINAL | 8229 # ifdef FEAT_TERMINAL |
8230 /* Cannot set 'modifiable' when in Terminal mode. */ | 8230 /* Cannot set 'modifiable' when in Terminal mode. */ |
8231 if (term_in_terminal_mode()) | 8231 if (term_in_terminal_mode() |
8232 || (bt_terminal(curbuf) && !term_is_finished(curbuf))) | |
8232 { | 8233 { |
8233 curbuf->b_p_ma = FALSE; | 8234 curbuf->b_p_ma = FALSE; |
8234 return (char_u *)N_("E946: Cannot make a terminal with running job modifiable"); | 8235 return (char_u *)N_("E946: Cannot make a terminal with running job modifiable"); |
8235 } | 8236 } |
8236 # endif | 8237 # endif |