Skip to content

FloatermSend does not work after visual selection. #435

@nickkzl

Description

@nickkzl

Environment

  • Output of vim --version:VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Apr 01 2024 14:35:29)
    Included patches: 1-252
    Compiled by Arch Linux
    Huge version without GUI. Features included (+) or not (-):
    +acl +file_in_path +mouse_urxvt -tag_any_white
    +arabic +find_in_path +mouse_xterm +tcl/dyn
    +autocmd +float +multi_byte +termguicolors
    +autochdir +folding +multi_lang +terminal
    -autoservername -footer -mzscheme +terminfo
    -balloon_eval +fork() +netbeans_intg +termresponse
    +balloon_eval_term +gettext +num64 +textobjects
    -browse -hangul_input +packages +textprop
    ++builtin_terms +iconv +path_extra +timers
    +byte_offset +insert_expand +perl/dyn +title
    +channel +ipv6 +persistent_undo -toolbar
    +cindent +job +popupwin +user_commands
    -clientserver +jumplist +postscript +vartabs
    -clipboard +keymap +printer +vertsplit
    +cmdline_compl +lambda +profile +vim9script
    +cmdline_hist +langmap -python +viminfo
    +cmdline_info +libcall +python3/dyn +virtualedit
    +comments +linebreak +quickfix +visual
    +conceal +lispindent +reltime +visualextra
    +cryptv +listcmds +rightleft +vreplace
    +cscope +localmap +ruby/dyn +wildignore
    +cursorbind +lua/dyn +scrollbind +wildmenu
    +cursorshape +menu +signs +windows
    +dialog_con +mksession +smartindent +writebackup
    +diff +modify_fname -sodium -X11
    +digraphs +mouse -sound +xattr
    -dnd -mouseshape +spell -xfontset
    -ebcdic +mouse_dec +startuptime -xim
    +emacs_tags +mouse_gpm +statusline -xpm
    +eval -mouse_jsbterm -sun_workshop -xsmp
    +ex_extra +mouse_netterm +syntax -xterm_clipboard
    +extra_search +mouse_sgr +tag_binary -xterm_save
    -farsi -mouse_sysmouse -tag_old_static
    system vimrc file: "/etc/vimrc"
    user vimrc file: "$HOME/.vimrc"
    2nd user vimrc file: "~/.vim/vimrc"
    user exrc file: "$HOME/.exrc"
    defaults file: "$VIMRUNTIME/defaults.vim"
    fall-back for $VIM: "/usr/share/vim"
    Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -g -ffile-prefix-map=/build/vim/src=/usr/src/debug/vim -flto=auto -D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
    Linking: gcc -Wl,-E -Wl,-rpath,/usr/lib/perl5/5.38/core_perl/CORE -Wl,-O1 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,-z,pack-relative-relocs -flto=auto -L/usr/local/lib -o vim -lm -ltinfo -lelf -lacl -lattr -lgpm -L/usr/lib -ltclstub8.6 -ldl -lz -lpthread -lm

  • Platform:

    • Linux
    • Mac OS X
    • Windows

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions