Closed GoogleCodeExporter closed 9 years ago
whoops, sorry -- it looks like this was marked as a defect, which it really
isn't :)
Original comment by waz...@gmail.com
on 5 Oct 2010 at 3:33
Adding this as a configuration option sounds like a good idea, though it
probably won't be the default mode.
Original comment by nicora...@gmail.com
on 5 Oct 2010 at 5:11
After fooling a bit with the source, I managed to add this feature as follows
(arguably not the most elegant solution)
--- conque_1.1/autoload/conque_term.vim 2010-05-28 07:43:25.000000000 +0200
+++ conque_term.vim 2010-10-05 20:46:23.199629687 +0200
@@ -575,8 +575,11 @@
# wrap CUF/CUB around line breaks
wrap_cursor = False
+ # Set when the process is terminated
+ leave = False
+
# }}}
# constructor
def __init__(self): # {{{
@@ -605,10 +608,8 @@
# }}}
# write to pty
def write(self, input): # {{{
-
-
# check if window size has changed
self.update_window_size()
# write and read
@@ -617,8 +618,13 @@
# }}}
# read from pty, and update buffer
def read(self, timeout = 1): # {{{
+ if not self.proc.get_status():
+ self.leave = True
+ if vim.current.buffer.number == self.screen.buffer.number:
+ vim.command('bwipeout! ' + str(self.screen.buffer.number))
+ return
# read from subprocess
output = self.proc.read(timeout)
# and strip null chars
output = output.replace(chr(0), '')
@@ -715,8 +721,10 @@
# for polling
def auto_read(self): # {{{
self.read(1)
+ if self.leave:
+ return
if self.c == 1:
vim.command('call feedkeys("\<F23>", "t")')
else:
vim.command('call feedkeys("\<F22>", "t")')
Original comment by waz...@gmail.com
on 5 Oct 2010 at 6:47
I added a slightly modified version of your code to the new 1.2 release.
Set...
let g:ConqueTerm_CloseOnEnd = 1
...in your .vimrc
Thanks.
Original comment by nicora...@gmail.com
on 12 Oct 2010 at 1:27
Original issue reported on code.google.com by
waz...@gmail.com
on 5 Oct 2010 at 3:32