jalvesaq / zotcite

Neovim plugin for integration with Zotero
GNU General Public License v3.0
159 stars 13 forks source link

First line displays garbage characters #48

Closed cseanburns closed 2 years ago

cseanburns commented 2 years ago

(I've edited this post to clarify.)

Hi,

Thank you for this wonderful plugin.

Posting here because of an issue with a garbled line of characters at the top of the display (line one) sometimes when I open markdown files. It's not every time, but it's always at line one. It may also, but I'm unsure, only with a heading level on line one.

I narrowed it down to zotcite by removing all plugins (using vim-plug), and the problem didn't recur until I reinstalled and enabled zotcite. But I also think it might be caused by an interaction with another plugin, because I'm not seeing the characters when only zotcite is installed. (Update: it occurs with only zotcite installed; it doesn't seem to occur when no plugins are installed.)

The issue is seemingly random. I can open the file and see those characters, and close and re-open the file and it'll be fine.

The buffer is not affected. If I press 'o' to start a new line above the affected line, the regular text appears. Ctrl-l does not fix the issue.

I'm using Vim 8.2 on Ubuntu 22.04. If I can provide any other info, please let me know, but here is my plugin section from my .vimrc.

" Load plugins using vim-plug " https://github.com/junegunn/vim-plug call plug#begin('~/.vim/plugged')

" For R integration "Plug 'jalvesaq/Nvim-R' "Plug 'gaalcaras/ncm-R'

" For Git "Plug 'airblade/vim-gitgutter'

" Todo "Plug 'dbeniamine/todo.txt-vim'

" For writing " Center writing screen "Plug 'junegunn/goyo.vim'
"Plug 'preservim/vim-pencil' "Plug 'preservim/vim-wordy' "Plug 'godlygeek/tabular' "Plug 'Ron89/thesaurus_query.vim'

" Zotero integration Plug 'jalvesaq/zotcite'

" color schemes "Plug 'NLKNguyen/papercolor-theme' " set background=light " colorscheme PaperColor

" Initialize plugin system call plug#end()

Screenshot from 2022-07-11 00-01-04

jalvesaq commented 2 years ago

I can't replicate the bug with Vim 8.2.3995 (default Vim on Ubuntu 22.04), and the following vimrc:

filetype indent plugin on
syntax on

call plug#begin('~/.vim/plugged')
Plug 'jalvesaq/zotcite'
call plug#end()

Everything looks normal when I start editing the following example.md file on gnome-terminal:

# Random bug here?

Trying to replicate the bug #48
cseanburns commented 2 years ago

I've been playing around with it a bit more the last couple of days. I turned syntax off and that stopped it from happening. Then I set syntax on but commented out the colorscheme, and that seemed to also fix the issue. Now I'm loading some default colorschemes (the pre-installed ones, like maroloccio), and again, no issues. So my apologies---this may have nothing to do with zotcite. I'm not always sure how to debug something like this in Vim.