hismailbulut / Neoray

Simple and lightweight GUI client for Neovim
MIT License
148 stars 5 forks source link

0.0.8: Mouse text selection issues #11

Closed andis-sprinkis closed 3 years ago

andis-sprinkis commented 3 years ago

Please complete the following information:

Describe the bug When attempting to select characters in normal mode, whole words get selected.

Steps to reproduce

Select text with mouse cursor in normal mode.

Demonstration (top: Neovim running in st terminal emulator, bottom: neoray): https://user-images.githubusercontent.com/52537705/131246557-f0af1730-11b6-4375-95f5-b71fd3e4a563.mp4

Your neoray config in init.vim

let s:fontname = "CascadiaCodePL"
let s:fontsize = 10

function! AdjustFontSize(amount)
  let s:fontsize = s:fontsize+a:amount
  execute 'set guifont=' . s:fontname . ':h' . s:fontsize
endfunction

call AdjustFontSize(0)

noremap <C-ScrollWheelUp> :call AdjustFontSize(1)<CR>
noremap <C-ScrollWheelDown> :call AdjustFontSize(-1)<CR>
inoremap <C-ScrollWheelUp> <Esc>:call AdjustFontSize(1)<CR>a
inoremap <C-ScrollWheelDown> <Esc>:call AdjustFontSize(-1)<CR>a

Crash log if available (may be generated by neoray after crash)

Debug output (you can generate starting neoray with --verbose option)