Skip to content

Conversation

Grimy
Copy link
Contributor

@Grimy Grimy commented Oct 27, 2015

This commit ignores virtcols after the 32000th in some computations, in
order to avoid crashing or hanging when editing a file than contains
ludicrously long lines (more than 100,000,000 virtual columns).

The change is in plines_win_nofold, which is called by wrapping and folding
code. As a result, wrapping and folding will be done incorrectly for lines longer
than 32000 virtual columns. This has zero impact if the UI cannot render more
than 32000 characters at a time (which is usually the case).

fixes #2838 (see that issue for further discussion).

@Grimy Grimy changed the title Ignore virtcols after the 32000th in computations [RFC] Ignore virtcols after the 32000th in computations Nov 3, 2015
@Grimy Grimy changed the title [RFC] Ignore virtcols after the 32000th in computations [RFC] Fix crashes with very long lines Nov 3, 2015
@marvim marvim added the RFC label Nov 3, 2015
This is to avoid crashing or hanging when editing a file than contains
ludicrously long lines (more than 100,000,000 virtual columns).

The change is in plines_win_nofold, which is called by wrapping and folding
code. As a result, wrapping and folding may be done incorrectly when the UI is
capable of rendering more than 32000 characters at a time (tiny font).

fixes neovim#2838
@cjoach
Copy link

cjoach commented Jan 16, 2016

You could probably just rebase, the errors seems unrelated.

justinmk pushed a commit to justinmk/neovim that referenced this pull request Oct 22, 2017
…#3527

Avoid crashing or hanging when editing a file than contains ludicrously
long lines (more than 100,000,000 virtual columns).

The change is in plines_win_nofold, which is called by wrapping and folding
code. As a result, wrapping and folding may be done incorrectly when the UI is
capable of rendering more than 32000 characters at a time (tiny font).

fixes neovim#2838
@justinmk
Copy link
Member

Merged in #7430. Thanks @Grimy. Sorry this took so long.

@justinmk justinmk closed this Oct 22, 2017
@justinmk justinmk removed the RFC label Oct 22, 2017
sameedali added a commit to sameedali/neovim that referenced this pull request Oct 24, 2017
* 'master' of https://github.com/neovim/neovim: (554 commits)
  test: tabstop=<big-number> neovim#2838
  plines_win_nofold(): Ignore virtcols after 32000th computation neovim#3527
  :cquit : take an error code argument neovim#7336
  vim-patch:8.0.0140 (neovim#7428)
  cmake,bsd: Fix mandir to saner defaults. (neovim#7417)
  help, man.vim: change "outline" map to gO (neovim#7405)
  build: set MIN_LOG_LEVEL correctly (neovim#7419)
  vim-patch:8.0.1019
  vim-patch:8.0.0962
  bufhl: support creating new groups
  lint
  refactor/single-include: undo.h
  refactor/single-include: undo_defs.h
  refactor/single-include: syntax_defs.h
  refactor/single-include: regexp_defs.h
  refactor/single-include: terminal.h
  vim-patch:8.0.0118
  :checkhealth : validate $VIM
  ex_checkhealth: call health#check() directly
  doc: E5009 "Invalid $VIMRUNTIME"
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash: assertion failed
4 participants