Text pushed off right side of editor

This just started with the last update. 

Text is disappearing off the right side the screen when I edit an .html file. I can fix this with shift-scroll by making the text tiny, but then I can barely read it.

I've scoured the settings and can't find any references to the right margin under Editor -> appearance or Code Style -> HTML.

I'm hoping you can help me fix it. It's driving me crazy.

 

Notice the text going off the screen on the right in lines 1 and 7. 

 

 

11 comments
Comment actions Permalink

Hi there,

Please clarify your situation with some screenshots or screencast.

Maybe it's soft warp (when long line is displayed on few lines in editor while in fact remain a single line)?

 

>I've scoured the settings and can't find any references to the right margin under Editor -> appearance or Code Style -> HTML.

Hard wrap?

0
Comment actions Permalink

I've added a screen shot to the original message.

0
Comment actions Permalink

Also, setting "Hard wrap at" has no effect at all, no matter what it's set to.

0
Comment actions Permalink

>Notice the text going off the screen on the right in lines 1 and 7.

It's called "soft wrap" -- allows to see whole line without horizontal scrolling by displaying it on 2+ lines in editor.

See https://stackoverflow.com/a/21405348/783119

Settings/Preferences | Editor | General | Use soft wraps in editor -- this setting affects all files.

You can disable or enable this option on per file basis (until it's closed) via View | Active Editor | Use Soft Wraps

 

 

>Also, setting "Hard wrap at" has no effect at all, no matter what it's set to

Well, it works as that vertical line in the editor -- it denotes where you should be wrapping your line. It does not force wrap -- it's just an indicator. But it participate in "Code | Reformat Code..." if you use it. It can also hard wrap on typing if such option is enabled (it's disabled on my screenshot).

0
Comment actions Permalink

Use Soft Wraps has been turned on the whole time. I've never turned it off.

Soft wrap should not push characters off the right side of the page or have them behind the scroll bar as you see in my screenshot.

I don't actually want to force a hard wrap. I just want to see my text on the screen without having to scroll.

The soft wrap indicator is often hidden and I can't see if I have a soft or hard wrap at the end of a line.

 

 

 

0
Comment actions Permalink

You should not have horizontal scroll with soft warps enabled.

If you have it (which is hard to spot on screenshot TBH)... then it must be caused by something that I'm not aware of (OS specific setup / JDK issue etc).

 

I personally cannot suggest anything specific (especially since I do not know anything about your system/setup there). I may only suggest to use "Submit a Request" link at the top of the page to submit Support ticket -- support team should have better knowledge in such aspects.

0
Comment actions Permalink

P.S.

So far my best guess is (top and bottom parts of your screenshot) that it has to be something with font zooming ratio at OS level (rather unlikely to be caused by IDE font size setting) -- choosing another ratio might improve it. No better guess right now.

0
Comment actions Permalink

I definitely have a scroll bar with soft wraps (the gray bar directly below the text in the screenshot), but you're right.

I've confirmed that it is related to zooming at OS level. Apparently the IDE miscalculates the width of lines at some zooming ratios. I'm on Windows 10.

I'm not sure there's anything that can be done about it unless there's a way to set the number of columns of space on the right when using soft wraps.  That should be settable if it's not already, imo.

0
Comment actions Permalink

Maybe your monitor is HiDPI one?

I suggest do some searches on IDEA tracker (as this subject/issue is platform wide) -- just use better words / refine search and you may find suggestions in comments of how it can be bypassed/adjusted (or even a ticket that matches your case). You may start here: https://youtrack.jetbrains.com/issues/IDEA?q=windows%2010%20font%20ratio

I have 2 "normal" monitors with default font scaling ratio and do not have such issue and therefore not familiar with possible tickets in this area (once again: I have no info/idea about your hardware/setup).

0
Comment actions Permalink

I had the same problem! And I fix it!
I have Windows 10 and 4k HiDPI monitor and Use Soft Wraps has been turned on

I fixed it this way:
Help > Edit Custom VM Options
write:
-Dsun.java2d.uiScale.enabled=false
and restart program

0
Comment actions Permalink

I did not have -Dsun.java2d.uiScale.enabled in  my VM Options, but I haven't seen the problem since I added this:

-Dsun.java2d.uiScale.enabled=false

Thanks!

0

Please sign in to leave a comment.