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

Word Wrap feature not working #108326

Closed
ToniSHernandez opened this issue Oct 8, 2020 · 11 comments
Closed

Word Wrap feature not working #108326

ToniSHernandez opened this issue Oct 8, 2020 · 11 comments
Assignees
Labels
*duplicate Issue identified as a duplicate of another issue(s)

Comments

@ToniSHernandez
Copy link

Issue Type: Bug

I attempted to use [alt]Z and [alt]z tp get word wrap to work. When this failed, I clecked on View > Toggle Word Wrap. In either situation, the feature did not work.

VS Code version: Code 1.49.3 (2af0510, 2020-10-02T17:57:01.595Z)
OS version: Windows_NT x64 10.0.18362

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8550U CPU @ 1.80GHz (8 x 1992)
GPU Status 2d_canvas: enabled
flash_3d: enabled
flash_stage3d: enabled
flash_stage3d_baseline: enabled
gpu_compositing: enabled
multiple_raster_threads: enabled_on
oop_rasterization: disabled_off
opengl: enabled_on
protected_video_decode: enabled
rasterization: enabled
skia_renderer: disabled_off_ok
video_decode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
Load (avg) undefined
Memory (System) 15.89GB (4.09GB free)
Process Argv --crash-reporter-id 470139ae-9e22-47f5-9264-1f8c13641922
Screen Reader yes
VM 0%
Extensions (21)
Extension Author (truncated) Version
html-snippets abu 0.2.1
beautify-blade api 1.0.1
es7-react-js-snippets dsz 3.0.0
vscode-npm-script eg2 0.3.13
php-intellisense fel 2.3.14
php-pack fel 1.0.2
vscode-firefox-debug fir 2.9.1
auto-close-tag for 0.5.8
vue-snippets hol 0.1.12
vscode-JS-CSS-HTML-formatter lon 0.2.3
remote-wsl ms- 0.44.5
debugger-for-chrome msj 4.12.11
vetur oct 0.28.0
laravel-blade one 1.24.0
vue-beautify pea 2.0.4
LiveServer rit 5.6.1
vscode-scss-formatter sib 2.0.2
open-in-browser tec 2.0.0
vscodeintellicode Vis 1.2.10
eno Wsc 2.3.20
JavaScriptSnippets xab 1.8.0
@gjsjohnmurray
Copy link
Contributor

Does the problem also happen after you run the Command Palette command to reload with all extensions disabled?

@DarkLite1
Copy link

DarkLite1 commented Oct 12, 2020

We're having the same issue, not all files will wrap their text at 80 characters but some do. Triggering a reload of the window, ALT + Z or something else does not wrap the text either.

User settings:

image

Workspace settings:

image

Both User\Settings.json and project.code-workspace.json have the option editor.wordWrap: wordWrapColumn but not the value 80.

project.code-workspace.json

{
	"folders": [
		{
			"path": "PowerShell"
		},
		{
			"path": "T:\\Prod"
		},
		{
			"path": "C:\\Program Files\\WindowsPowerShell\\Modules"
		}
	],
	"settings": {
		"editor.wordWrap": "wordWrapColumn"
	}
}

The thing I've noticed is that wrapping only works in the first folder PowerShell within my vs code project but for files within the other 2 folders. Maybe that helps to narrow it down.

Version: 1.50.0 (system setup)
Commit: 93c2f0fbf16c5a4b10e4d5f89737d9c2c25488a3
Date: 2020-10-07T06:10:52.432Z
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.14393

@DarkLite1
Copy link

Does the problem also happen after you run the Command Palette command to reload with all extensions disabled?

Just tried this, yes the problem remains when reloading without extensions.

@alexdima
Copy link
Member

@DarkLite1 Word wrapping can be influenced by folder level settings, and it appears you are using a workspace file with further word wrapping settings. To eliminate the complicated settings setup, could you please create a separate new folder on your machine, open that folder and open a powershell file in that folder. What is the behavior? What settings do you have in your user settings?

Except via settings, word wrapping is disabled when:

  • configuring the editor to be in accessibility mode (like attaching a screen reader or configuring editor.accessibilitySupport): the root cause is that we cannot at this time efficiently transmit the difference between a wrapping point and a new line to screen readers, the solution is to use "editor.accessibilitySupport": "off". When this occurs, there is a status bar message indicating this.
  • when a very large file is opened (we do this to save memory), but this can be forced via "editor.largeFileOptimizations": false. When this occurs, a prompt is shown informing you.

@ToniSHernandez @DarkLite1 Do you perhaps run into one of the two cases I outlined above?

@alexdima alexdima added the info-needed Issue requires more information from poster label Oct 12, 2020
@DarkLite1
Copy link

DarkLite1 commented Oct 15, 2020

Thank you for getting back to me. I've tried your suggestion to create a new folder, add a ps1 file and check what happens:

  • The ps1 file is correctly having its lines wrapped at 80 chars as desired
  • The User Settings:
    image

To get back to the two exceptions you suggested, this is not he case for us. It's a small ps1 file and we don't have anything special configured.

Correct example from the test:
image

This really is related to multiple folders in the same workspace where wrapping is not respected. At least, that's what it looks like to me. Because in the base folder 'PowerShell' wrapping works but not in the other two.

@jabcross
Copy link

I'm having a similar issue. I have VSCode opened on a folder with no special configuration, and wordWrapColumn set to 80. It doesn't work on bounded mode, either.

image

@alexdima
Copy link
Member

@sandy081 IMHO word wrapping works correctly (or as configured). The problem is that folks have a hard time configuring it.

In the first case, @DarkLite1 is using a multi-folder workspace and has trouble configuring word wrapping. I believe there are workspace level settings and folder level settings at work, but I don't understand from the provided steps what exactly is misconfigured where. 🤷‍♂️

In the second case I believe @jabcross is trying to configure word wrapping at 80, but the default markdown language specific settings override the user settings.

IMHO both of these are UX problems, i.e. the setting works as configured, but the people have a hard time to configure it how they want it.

@alexdima alexdima assigned sandy081 and unassigned alexdima Oct 26, 2020
@jabcross
Copy link

jabcross commented Oct 26, 2020

@alexdima It does, in fact, only happen in Markdown mode. But a silent default that overrides an explicit setting is a bug. Especially if it doesn't automatically create a field in settings.json to change it back if wanted.


This does seem to solve the problem.

    "[markdown]": {
        "editor.wordWrap": "bounded"
    },

@sandy081 sandy081 assigned roblourens and unassigned sandy081 Oct 29, 2020
@sandy081 sandy081 removed the info-needed Issue requires more information from poster label Oct 29, 2020
@sandy081
Copy link
Member

Assigning to @roblourens to see if there can be any UX improvements can be done with our settings editor for these scenarios.

@roblourens
Copy link
Member

Thinking this is #79273 and #74195

@roblourens roblourens added the *duplicate Issue identified as a duplicate of another issue(s) label Nov 4, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
*duplicate Issue identified as a duplicate of another issue(s)
Projects
None yet
Development

No branches or pull requests

7 participants