Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected click+drag behavior within the minimap buffer #144

Closed
invokah opened this issue Feb 16, 2022 · 4 comments
Closed

Unexpected click+drag behavior within the minimap buffer #144

invokah opened this issue Feb 16, 2022 · 4 comments
Labels
stale wontfix This will not be worked on

Comments

@invokah
Copy link

invokah commented Feb 16, 2022

Installation: manually, using #2 install script (after I used chmod +x minimap_generator.sh)

vim --version
VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 06 2022 17:44:00)
Included patches: 1-3995
Modified by team+vim@tracker.debian.org
Compiled by team+vim@tracker.debian.org
Huge version without GUI.  Features included (+) or not (-):
+acl               +cmdline_hist      +ex_extra          +jumplist          +mouse_dec         -perl              +sodium            +textobjects       +wildmenu
+arabic            +cmdline_info      +extra_search      +keymap            +mouse_gpm         +persistent_undo   -sound             +textprop          +windows
+autocmd           +comments          -farsi             +lambda            -mouse_jsbterm     +popupwin          +spell             +timers            +writebackup
+autochdir         +conceal           +file_in_path      +langmap           +mouse_netterm     +postscript        +startuptime       +title             -X11
-autoservername    +cryptv            +find_in_path      +libcall           +mouse_sgr         +printer           +statusline        -toolbar           -xfontset
-balloon_eval      +cscope            +float             +linebreak         -mouse_sysmouse    +profile           -sun_workshop      +user_commands     -xim
+balloon_eval_term +cursorbind        +folding           +lispindent        +mouse_urxvt       -python            +syntax            +vartabs           -xpm
-browse            +cursorshape       -footer            +listcmds          +mouse_xterm       -python3           +tag_binary        +vertsplit         -xsmp
++builtin_terms    +dialog_con        +fork()            +localmap          +multi_byte        +quickfix          -tag_old_static    +vim9script        -xterm_clipboard
+byte_offset       +diff              +gettext           -lua               +multi_lang        +reltime           -tag_any_white     +viminfo           -xterm_save
+channel           +digraphs          -hangul_input      +menu              -mzscheme          +rightleft         -tcl               +virtualedit
+cindent           -dnd               +iconv             +mksession         +netbeans_intg     -ruby              +termguicolors     +visual
-clientserver      -ebcdic            +insert_expand     +modify_fname      +num64             +scrollbind        +terminal          +visualextra
-clipboard         +emacs_tags        +ipv6              +mouse             +packages          +signs             +terminfo          +vreplace
+cmdline_compl     +eval              +job               -mouseshape        +path_extra        +smartindent       +termresponse      +wildignore
   system vimrc file: "$VIM/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 -Wdate-time -g -O2 -ffile-prefix-map=/build/vim-ecUvJz/vim-8.2.3995=. -fstack-protector-strong -Wformat -Werror=format-security -D_
REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -Wl,-z,relro -Wl,-z,now -Wl,--as-needed -o vim -lm -ltinfo -lselinux -lsodium -lacl -lattr -lgpm -ldl
.vimrc
"vim configuration
set nocompatible

set ttyfast
set ttymouse=sgr

"extension settings
let g:ranger_replace_netrw=1
let g:minimap_width=15
let g:minimap_auto_start=1
let g:minimap_auto_start_win_enter=1
let g:minimap_highlight_search=1
let g:minimap_highlight_range=1
let g:minimap_git_colors=1

"indent
set autoindent
set expandtab
"set filetype indent on
set shiftround
set shiftwidth=4
set smarttab
set tabstop=4

"search options
"set hlsearch
set ignorecase
set incsearch
set smartcase

"performance options
"set complete-=i 
"set lazyredraw

"text rendering options
set display+=lastline
set encoding=utf-8
set linebreak
set scrolloff=5
syntax enable
set wrap
set fillchars=vert:\│

"UI Options
set cmdheight=2
set updatetime=300
set laststatus=2
set ruler
set wildmenu
"set tabpagemax=50
colorscheme gruvbox
set cursorline
set number
set relativenumber
set noerrorbells
set visualbell
set mouse=a
set title
set background=dark

"Misc
set autoread
set backspace=indent,eol,start
set backupdir=~/.cache/vim
set confirm
set dir=~/.cache/vim
"set formatoptions+=j
set hidden
set history=1000
set nomodeline
set noswapfile

set smartindent

set colorcolumn=95

"Window stuff
set splitright
set splitbelow

" Don't pass messages to |ins-completion-menu|.
set shortmess+=c

" Always show the signcolumn, otherwise it would shift the text each time
" diagnostics appear/become resolved.
if has("patch-8.1.1564")
  " Recently vim can merge signcolumn and number column into one
  set signcolumn=number
else
  set signcolumn=yes
endif

" Use tab for trigger completion with characters ahead and navigate.
" NOTE: Use command ':verbose imap <tab>' to make sure tab is not mapped by
" other plugin before putting this into your config.
inoremap <silent><expr> <TAB>
      \ pumvisible() ? "\<C-n>" :
      \ <SID>check_back_space() ? "\<TAB>" :
      \ coc#refresh()
inoremap <expr><S-TAB> pumvisible() ? "\<C-p>" : "\<C-h>"

function! s:check_back_space() abort
  let col = col('.') - 1
  return !col || getline('.')[col - 1]  =~# '\s'
endfunction

" Use <c-space> to trigger completion.
if has('nvim')
  inoremap <silent><expr> <c-space> coc#refresh()
else
  inoremap <silent><expr> <c-@> coc#refresh()
endif

source /usr/share/doc/fzf/examples/fzf.vim

Action performed: I click on the minimap buffer, going to the correct line on initial click. Then, while holding my mouse button down still, I drag in any direction.

What happens: when clicking on the minimap buffer, if I drag in any direction, the minimap will move upwards (and my cursor, as well).

Behavior I expected: clicking the minimap, and then dragging upwards would send the cursor upwards, clicking the minimap, and then dragging it downwards would send the cursor downwards, and likewise for left/right (or left/right not moving the cursor at all).

Is this possibly a problem with how I have my vim configured? If I am careful, I can drag the cursor down one line before it begins travelling upwards.

@ZNielsen
Copy link
Collaborator

General mouse interaction varies a lot between different terminal emulators and gets even more messy when adding tmux or screen into the mix. The behavior I see is different than what you are describing (using iTerm2 + tmux on MacOS), so my guess is this is terminal emulator + mouse settings specific.

@invokah
Copy link
Author

invokah commented Mar 6, 2022

@ZNielsen I tried using 6 other terminal emulators and they all featured the same behavior. Do you have any other troubleshooting suggestions? I'm not entirely sure what could be changing/specifying my mouse behavior (I am using a barebones wm, i3). I'm sorry if this is wasting your time; I really do like minimap.vim and would like to keep using it (preferably with the click+drag working if I can get it to).

@ZNielsen
Copy link
Collaborator

ZNielsen commented Mar 11, 2022

It might be a platform thing? MacOS seems to handle moving with the mouse just fine. Last thing you might want to try is to use tmux as another buffer between your input and the terminal?

Video shows

  1. Dragging with the mouse
  2. Scroll wheel usage
  3. Clicking to arbitrary lines
  4. Dragging with the mouse again
minimapvim_GH-144.mp4

@stale
Copy link

stale bot commented Jun 10, 2022

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 10, 2022
@stale stale bot closed this as completed Jul 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

2 participants