Parts of long Python lines get erroneously echoed
Issue description
Entering a long comment (I think it happens with others kinds of long lines too, but I couldn't reproduce it by entering a long integer literal, for instance) in a Python buffer makes a part of that line get echoed in Codi's window. The threshold length for this behaviour seems to be 74 chars. I haven't tested other languages.
Codi log snippet which demonstrates that the line gets broken which causes the issue:
[21:11:16.292494] <SNR>149_codi_do_update[25]: Starting job for buffer 10
[21:11:16.295624] <SNR>149_user_au[1]: Doing autocommand CodiEnterPost
[21:11:16.375917] <SNR>149_codi_handle_data[9]: async line: # Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod
[21:11:16.376491] <SNR>149_codi_handle_data[9]: async line: Python 3.5.2 (default, Jun 28 2016, 08:46:01)
[21:11:16.376716] <SNR>149_codi_handle_data[9]: async line: [GCC 6.1.1 20160602] on linux
[21:11:16.376939] <SNR>149_codi_handle_data[9]: async line: Type "help", "copyright", "credits" or "license" for more information.
[21:11:16.377255] <SNR>149_codi_handle_data[9]: async line: >>> # Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy
[21:11:16.377624] <SNR>149_codi_handle_data[9]: async line: eirmod
[21:11:16.377827] <SNR>149_codi_handle_data[9]: async line: ...
[21:11:16.377944] <SNR>149_stop_job_for_buf[8]: Stopping job for buffer 10
Environment
- Operating system: Arch Linux
- Codi version: Latest master (6f83309975a8936b1ed119f2d6bb4102982a8b57)
- nvim version:
NVIM 0.1.6
Build type: RelWithDebInfo
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -Wconversion -O2 -g -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENERATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim/src/build/config -I/build/neovim/src/neovim-0.1.6/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neovim/src/build/include
Compiled by builduser```
Optional features included (+) or not (-): +acl +iconv +jemalloc +tui
For differences from Vim, see :help vim-differences
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "/usr/share/nvim"
Seems like an nvim-only issue - I can reproduce it there, but not in vim. Can you confirm this?
Alright, it's been 3 years, and I can confirm this is nvim-only bug. This is the line that always reproduces the bug for me:
from z3 import BitVec, Solver, unsat, RotateRight, Extract, Concat, BitVecVal
This is my python version:
Python 3.6.9
This is my vim version:
VIM - Vi IMproved 8.0 (2016 Sep 12)
Included patches: 1-1568
This is my nvim version:
NVIM v0.3.7
To add to that, neovim has a lot of issues with long lines. Sometimes I get a SyntaxError on long lines (it seems lines are getting cut in the middle), sometimes the output for long command lines is one line off, etc.
