On Sunday, April 30, 2017 at 9:24:13 PM UTC+3, Bram Moolenaar wrote:
> Ramel Eshed wrote:
>
> > On Sunday, April 30, 2017 at 5:25:08 PM UTC+3, Bram Moolenaar wrote:
> > > Ramel Eshed wrote:
> > >
> > > > This is not the case with every job, but redirecting the following
> > > > script output to a buffer causes messages to disappear from command
> > > > line:
> > > >
> > > > -- loop.sh --
> > > > #!/bin/bash
> > > > for i in `seq 1 1000`;
> > > > do
> > > > echo $i
> > > > sleep 0.008s
> > > > done
> > > >
> > > > vim -u NONE -N
> > > > :call job_start('loop.sh', {'out_io': 'buffer', 'out_buf':1})
> > > >
> > > > while the numbers are running try to do :pwd -this command's output
> > > > will disappear.
> > > >
> > > > Also (not related to this issue), the buffer (which the job output was
> > > > redirected to) is only updated in normal and insert mode but not while
> > > > typing in command-line mode. Is it possible to update the buffer also
> > > > for command-line?
> > >
> > > I suspect these are opposite requests. Vim can only update the whole
> > > screen, because the redraw causes any output from commands to be
> > > cleared. When looking at the output of :pwd, Vim is probably in Normal
> > > mode, thus redraws to show the new buffer content.
> >
> > If I use
> > :call job_start('ls -lR /', {'out_io': 'buffer', 'out_buf':1})
> > instead of the above script, I can still see the :pwd command output.
> > How come it's not cleared as well?
> >
> > > I could check if we can update the window only. This probably only works
> > > when the command line has not scrolled.
>
> I have sent out patch 8.0.0592. This attempts to update the buffer that
> shows job output as often as possible. And it tries to keep the command
> line and command output. Please check it out. It does update the
> buffer more often than before, and should keep the output of commands
> like ":pwd". It may cause new problems, I only tested a few things.
>
I tested this patch with my plugins and it seems that both issues are solved
now. There is a minor issue with text and cursor flickering in the command
line, you can play with the sleep delay in the script above and see if there is
something you can do.
Many thanks!
> --
> I just planted an Algebra tree. It has square roots.
>
> /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
> /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
> \\\ an exciting new programming language -- http://www.Zimbu.org ///
> \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.