voldikss / vim-floaterm

:computer: Terminal manager for (neo)vim
MIT License
2.46k stars 79 forks source link

FloatermSend does not work after visual selection. #435

Open nickkzl opened 2 months ago

nickkzl commented 2 months ago

Environment

FloatermSend always use '<,'> range if it exists ignoring explicitly defined range. For example if you did visual selection in your vim session, :2,3FloatermSend will send the recent visual selection instead of lines 2 and 3. When there was not visual selection in the session, FloatermSend works as expected.

Steps to reproduce

Using the minimal vimrc

set nocompatible
set hidden
set termguicolors
set runtimepath^=/path/to/vim-floaterm
filetype plugin indent on
syntax on

Steps to reproduce the behavior:

  1. Start vim using minimal vimrc
  2. Insert the following text: echo FirstString echo SendMe echo SendMeToo
  3. Go to the first string
  4. In normal mode press <Shift-v>to do select the first line
  5. Press <Esc>to return to normal mode.
  6. :packadd vim-floaterm
  7. :FloatermNew --wintype=split
  8. <Ctrl-w>w to return to the text window
  9. :2,3FloatermSend

    Actual behaviour

    $ echo FirstString FirstString

Expected behaviour

$ echo SendMe SendMe $ echo SendMeToo SendMeToo

Screenshots(Optional, GIF is better)