Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Warp does not redraw screen in vim when scrolling

Open michbsd opened this issue 2 years ago • 19 comments

Discord username (optional)

michbsd

Describe the bug

Whenever I am editing files in vim - and I scroll down in the document the vim status bar in not properly redrawn and is messing up the UI. I have to hit "ctrl-L" to redraw every single time I scroll up or down in vim...

image2

To Reproduce

  1. Open a file with vim
  2. make sure you have a status bar configured in your vimrc
  3. scroll down in your document

Expected behavior

I should be able to use vim without having to manually redraw the screen whenever I scroll to a new section

Screenshots

No response

Operating System

MacOS

OS Version

13.3.1

Shell Version

zsh 5.9

Warp Version

v0.2023.04.11.08.03.stable_00

Additional context

No response

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

None

michbsd avatar Apr 21 '23 08:04 michbsd

Thanks for letting us know @michbsd We'll post any updates on this thread. Please :+1: and comment if you're also seeing this issue as it helps us gauge impact.

dannyneira avatar Apr 24 '23 18:04 dannyneira

Hi @michbsd We weren't able to reproduce this with a simple status bar, would you be able to provide us with the .vimrc file you're using so we could try and reproduce this issue?

dannyneira avatar May 05 '23 17:05 dannyneira

sure @dannyneira Here it is:

❯ cat ~/.vimrc

" Vundle
filetype off

let g:vundle_default_git_proto = 'git'
set rtp+=~/.vim/bundle/Vundle.vim
call vundle#begin()

" Bundles
Plugin 'VundleVim/Vundle.vim'
Plugin 'tpope/vim-fugitive'
Plugin 'sjl/gundo.vim'
Plugin 'godlygeek/tabular'
Plugin 'bling/vim-airline'
Plugin 'vim-airline/vim-airline-themes'
Plugin 'altercation/vim-colors-solarized'
Plugin 'scrooloose/nerdtree'
Plugin 'TomNomNom/xoria256.vim'
Plugin 'fatih/vim-go'
Plugin 'rust-lang/rust.vim'
Plugin 'junegunn/fzf'
Plugin 'junegunn/fzf.vim'


call vundle#end()


" Required for vundle
"filetype plugin indent on
filetype plugin on

" Highlighting
syntax on

set encoding=utf-8

" Airline config
let g:airline_powerline_fonts = 1
let g:airline#extensions#tabline#enabled = 1
let g:airline_theme='powerlineish'

" History
set history=50

" Display
set ls=2
set showmode
set showcmd
set modeline
set ruler
"set title
set nu

" Line wrapping
set nowrap
set linebreak
set showbreak=▹

" Auto indent what you can
set autoindent

" Searching
set ignorecase
set smartcase
set gdefault
set hlsearch
set showmatch

" Enable jumping into files in a search buffer
set hidden

" Make backspace a bit nicer
set backspace=eol,start,indent

" Indentation
set shiftwidth=4
set tabstop=4
set softtabstop=4
set shiftround
set expandtab

" Disable mouse
set mouse=

" Colorscheme
if &t_Co == 256
    try
        color xoria256
    catch /^Vim\%((\a\+)\)\=:E185/
        " Oh well
    endtry
endif

" Switch tabs
map 8 <Esc>:tabe
map 9 gT
map 0 gt

" Gundo toggle
map <F5> <Esc>:GundoToggle<CR>

" Toggle line-wrap
map <F6> <Esc>:set wrap!<CR>

" Open file under cursor in new tab
map <F9> <Esc><C-W>gF<CR>:tabm<CR>

" Direction keys for wrapped lines
nnoremap <silent> k gk
nnoremap <silent> j gj
nnoremap <silent> <Up> gk
nnoremap <silent> <Down> gj
inoremap <silent> <Up> <Esc>gka
inoremap <silent> <Down> <Esc>gja

" Bash / emacs keys for command line
cnoremap <C-a> <Home>
cnoremap <C-e> <End>

" Base64 decode word under cursor
nmap <Leader>b :!echo <C-R><C-W> \| base64 -d<CR>

" grep recursively for word under cursor
nmap <Leader>g :tabnew\|read !grep -Hnr '<C-R><C-W>'<CR>

" Visual prompt for command completion
set wildmenu

" Write current file with sudo perms
"command! W w !sudo tee % > /dev/null
command! W w

" folding
set nofoldenable

set termguicolors

" Open word under cursor as ctag in new tab
map <C-\> :tab split<CR>:exec("tag ".expand("<cword>"))<CR>

if $VIMENV == 'talk'
  set background=light
  let g:solarized_termcolors=256
  colo solarized
  noremap <Space> :n<CR>
  noremap <Backspace> :N<CR>
else
  " Trans background
  hi Normal ctermbg=none
  hi NonText ctermbg=none
endif

if $VIMENV == 'prev'
  noremap <Space> :n<CR>
  noremap <Backspace> :N<CR>
  set noswapfile
endif

set noesckeys

set nocompatible

autocmd BufNewFile,BufRead *.vcl set syntax=vcl

" set the interactive flag so bash functions are sourced from ~/.bashrc etc
"set shellcmdflag=-ci

michbsd avatar May 08 '23 10:05 michbsd

btw- it seems like it is only happening when I have ssh'ed to a remote host and running vim. running vim directly (locally) from my terminal is working fine.

michbsd avatar May 09 '23 14:05 michbsd

Thanks for clarifying this is only an SSH issue, I was able to reproduce this in an SSH session with no changes to default vim. We'll investigate further and post any updates on this thread.

dannyneira avatar May 09 '23 15:05 dannyneira

@michbsd It could possibly by one of the vim plugins you're using that's causing this issue. I used the same .vimrc file you provided without the plugins ( since I didn't have them installed ) in SSH and I wasn't seeing the same issue. I suggest you try and go thru commenting out the plugins until you find the culprit. Then, you can disable parts of your dotfiles just for Warp by using this conditional statement:

# Bash and Zsh
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
# > What you want to disable here <
fi

dannyneira avatar May 09 '23 19:05 dannyneira

Thanks for your reply @dannyneira

Even when opening a default vim (without any configuration) and then just doing "set laststatus=2" the issue presents itself:

Screenshot 2023-05-10 at 09 36 33

michbsd avatar May 10 '23 07:05 michbsd

Thanks for confirming, I was able to repo this one briefly, but can't anymore so it appears intermittent on my end, I'll pass some steps along to the Eng team to see if they have any luck reproducing this. Appreciate your patience while we try and get to the bottom of this.

dannyneira avatar May 10 '23 15:05 dannyneira

Thanks @dannyneira - if it helps, I seem to be reliably reproducing the issue when ssh'ing to any FreeBSD machine.

michbsd avatar May 10 '23 15:05 michbsd

@michbsd OOC - what version of vim are you running on those machines?

vorporeal avatar May 10 '23 17:05 vorporeal

@dannyneira

VIM - Vi IMproved 9.0 (2022 Jun 28, compiled Apr 11 2023 17:16:38)
Included patches: 1-1441
Compiled by root@124amd64-default-job-08
Huge version without GUI.  Features included (+) or not (-):

michbsd avatar May 10 '23 19:05 michbsd

Just confirming that this is still an issue with Warp v0.2023.05.09.08.03.stable_01

michbsd avatar May 12 '23 06:05 michbsd

+1 for this, using vi inside an SSH session is extremely unreliable and has caused me to lose data because I didn't know the shortcut to redraw the screen. I don't know about the status line, the whole view becomes corrupted.

Can confirm that this is using FreeBSD 13.2

ctipper avatar Dec 03 '23 09:12 ctipper

Still not resolved for neither.. I think it is a pretty basic use-case that one should be able to open vim in a remote session via terminal application. I am quite frankly surprised that the Warp team are working on fancy bells and whistles instead of fixing the very basics.

michbsd avatar Dec 03 '23 13:12 michbsd

Can confirm it still happen in v0.2024.03.12.08.02.stable_01 on MacOS, but on my linux machine it's working correctly

ffd114 avatar Mar 17 '24 08:03 ffd114

@dannyneira can we get some eyeballs on this issue open for over a year now..

michbsd avatar Jun 07 '24 15:06 michbsd

Hi @michbsd quick update, we're looking into this issue further and will post as we have them. Thanks for your patience folks!

dannyneira avatar Jun 10 '24 15:06 dannyneira

This is really hampering usage of Warp with pfSense and OPNsense boxes :/

utsur0 avatar Jun 25 '24 10:06 utsur0

I switched to neovim - and the issue does to occur there.. 🤷🏼

michbsd avatar Jun 25 '24 12:06 michbsd

I'm finally taking a look at this. Possibly related to #5166?

acarl005 avatar Jul 24 '24 14:07 acarl005

@michbsd I suspect the issue has to do with the terminfo database on your remote server. I was finally able to reproduce this error by changing the value of TERM. Setting TERM=vte-256color finally reproduced this error.

Can you run echo $TERM on your host and post the value? I also wonder if setting export TERM=xterm-256color on your server might fix the issue?

acarl005 avatar Jul 25 '24 16:07 acarl005

xterm-256color

I switched to neovim, which does not exhibit the behavior

michbsd avatar Jul 25 '24 18:07 michbsd

Hi Folks, this has been resolved in latest version of Warp. Closing as resolved, but please update and let us know if any issues.

dannyneira avatar Jul 31 '24 19:07 dannyneira