Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"editor.wordWrap": "off" does not work #21801

Closed
skaegi opened this issue Mar 2, 2017 · 10 comments
Closed

"editor.wordWrap": "off" does not work #21801

skaegi opened this issue Mar 2, 2017 · 10 comments
Assignees
Labels
editor-wrapping Editor line wrapping issues verification-found Issue verification failed verification-needed Verification of issue is requested verified Verification succeeded
Milestone

Comments

@skaegi
Copy link

skaegi commented Mar 2, 2017

  • VSCode Version: Code 1.10.1 (653f873, 2017-03-02T00:27:09.350Z)
  • OS Version: Darwin x64 16.4.0
  • Extensions:
Extension Author Version
swagger-viewer Arjun 1.3.0

Steps to Reproduce:

  1. Open a file with very long lines
  2. No matter what editor.wordWrap is in your settings the line wraps at your viewport

This makes it basically impossible to work with some files. This worked in 1.10.0 so is a regression

@Tekbr
Copy link

Tekbr commented Mar 2, 2017

  • VSCode Version: 1.10.1(653f873) and 1.11.0-insider (0bc62d1)
  • OS Version: Windows 10

I have the same problem.

wordwrap

It looks like the same is not updating the settings file.

wordwrap2

@xavadu
Copy link

xavadu commented Mar 7, 2017

no working for me as well with (running in Ubuntu 16.04), it stop to work in the latest update when the name of the wrap preference was changed and have to set "off" instead of -1 :

Version 1.10.1
Commit 653f8733dd5a5c43d66d7168b4701f94d72b62e5
Date 2017-03-02T00:47:58.633Z
Shell 1.4.6
Renderer 53.0.2785.143
Node 6.5.0

@alexdima alexdima added the editor-wrapping Editor line wrapping issues label Mar 7, 2017
@alexdima
Copy link
Member

alexdima commented Mar 7, 2017

Related: #21552

As a guard against freezes (caused by our non being able to virtualize rendering horizontally), we try to identify "minified" files. (i.e. think minified CSS, minified JS, etc.). We forcefully word wrap minified files.

On the insiders channel, the Toggle Word Wrap Action is able to unwrap these files. There is also an undocumented "editor.wordWrapMinified": false setting that works for now on the insiders channel.

We need to think how to better align the two desires:

  • first, our desire to not "freeze" while rendering huge lines (i.e. rendering a frame in < 16ms)
  • secondly, the end-user desire to never wrap

@alexdima alexdima added the bug Issue identified by VS Code Team member as probable bug label Mar 7, 2017
@alexdima alexdima added this to the March 2017 milestone Mar 7, 2017
@xavadu
Copy link

xavadu commented Mar 10, 2017

Thanks for the explanation and the undocumented solution, but for me "editor.wordWrapMinified": false is not working anyway (and it is marked as a unknown configuration setting)

@alexdima
Copy link
Member

  • bumped up the minified line limit to 10k chars, so a file will be identified as minified if more than 50% of its characters lie on lines longer than 10k chars.
  • added a primary editor action that shows up in this case:
    image

@alexdima alexdima added the verification-needed Verification of issue is requested label Mar 27, 2017
@isidorn isidorn removed the bug Issue identified by VS Code Team member as probable bug label Mar 28, 2017
@michelkaporin
Copy link
Contributor

michelkaporin commented Mar 29, 2017

@alexandrudima the button is there and it does its work. However there are some wrong things going on, thus not putting 'verified' now.

  1. UI does not allow to enable wrapping again through the same button (we've discussed it during the meeting, so I assume it's on your to-do list). Also, Ctrl+Z does not work for me to wrap it back (this should be current way to do it, as you said during discussion). Maybe it's because I've tested with very long minified file (https://code.jquery.com/jquery-3.2.0.min.js).

  2. If I have two minified files opened in my editor, and disable word-wrapping for one of them, the second one also automatically unwraps.

@alexdima
Copy link
Member

alexdima commented Mar 29, 2017

@michelkaporin

  1. Yes, the button disappears, I create a separate item to make the button "stick around" (Toggle word wrap button should "stick" around #23562). Ctrl+Z is undo and would undo the edits on a buffer (i.e. would not undo the toggle word wrap). Alt+Z would run the action again.

  2. Created Toggle word wrap affects all tabs in an editor slot #23561

@isidorn
Copy link
Contributor

isidorn commented Mar 30, 2017

Adding verified since @michelkaporin tested and the flows found alex extracted into seperate issues

@isidorn isidorn added the verified Verification succeeded label Mar 30, 2017
@Tekbr
Copy link

Tekbr commented Mar 30, 2017

-- Sorry for the English, I used Google Translator --

@alexandrudima @isidorn @michelkaporin If I understood correctly, when I use Alt + Z, does it only have effects for the file I'm open and not for the whole editor, as it did before? It is?

Sorry, but I think that's a regression.

Maybe another shortcut to just wordwrap this file.

I still prefer that Alt + Z affect the whole editor (on or off) rather than a single file.

@Download
Copy link

This makes it basically impossible to work with some files. This worked in 1.10.0 so is a regression

Suffering from this :(

I was just really getting into VSCode because (after some getting used to it) I was loving it's multi-line editing features and was using them to edit SQL.

Now with latest release (just updated it again hoping it was solved) there is no way I can get it to work anymore in some projects.... I can't figure out why but at some point the editor just starts wrapping and there is no way to make it stop. I spend hours trying all combinations of settings just to get it to stop the wrapping but the only way I found that will work for a while is creating an entirely new project :(

For me this breaks VSCode so bad I had to stop using it and switch back to Notepad++

It says here this issue is closed but why am I still seeing it?

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
editor-wrapping Editor line wrapping issues verification-found Issue verification failed verification-needed Verification of issue is requested verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

9 participants