Author Topic: Softwrap and line spacing  (Read 2479 times)

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Softwrap and line spacing
« on: September 25, 2017, 09:33:17 PM »
I've opened a file where the text is fairly narrow -- longest line is 91 characters.

When I toggle softwrap the line spacing changes.
With softwrap off, the editor window shows lines 1 to 62.
With softwrap on, this condenses to 1 to 66.

To be clear: No lines are actually wrapped. The window is much wider than the text.
Font is Courier new, size 10.

This happens until I set the font size to be 18 or larger.

HM... seems to change.
Now when I set my font back to size 10, I get 1..63(wrap off) and 1..68(wrap on).


Looks like the line spacing at font size N and wrapoff is the same as N+1 with wrap on.

This doesn't happen with a clean configuration.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6864
  • Hero Points: 528
Re: Softwrap and line spacing
« Reply #1 on: September 26, 2017, 01:36:38 AM »
Bold and italics isn't supported for soft wraped text. This causes the font calculations to change which causes the line spacing to change.

jporkkahtc

  • Senior Community Member
  • Posts: 2620
  • Hero Points: 210
  • Text
Re: Softwrap and line spacing
« Reply #2 on: September 26, 2017, 11:27:12 PM »
Well ... that doesn't seem true really.
Mostly, italics get confused when switching back and forth between wrapped and not.
Attached you can see it is in softwrap mode *and* comments are italics.

But, Slick is really getting confused here.
If I toggle in and out of Softwrap it gets into a state where only the current line gets either italic or underlined -- see the 2nd attachment.

LineComment: Set to Italic.
BlockComment: Set to Underline
DocComment: Set to Italic

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6864
  • Hero Points: 528
Re: Softwrap and line spacing
« Reply #3 on: September 26, 2017, 11:40:38 PM »
Softwrap only doesn't support bold and italic for proportional fonts and Unicode source windows. I looked into the line spacing once before and found that this was normal. Unfortunately, I don't remember why for this case.

I wasn't able to reproduce the odd change to underlines. I suspect I need a different config or different test case.

I did try your file. I also tried an old config you sent us.
« Last Edit: September 27, 2017, 12:10:52 PM by Clark »

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6864
  • Hero Points: 528
Re: Softwrap and line spacing
« Reply #4 on: September 27, 2017, 01:55:04 PM »
Reproduced. I think there is a cache that needs to be cleared when you change the colors.

Clark

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 6864
  • Hero Points: 528
Re: Softwrap and line spacing
« Reply #5 on: September 27, 2017, 03:43:16 PM »
Clearing the cache does the trick. Fixed for next build. It won't have any effect on line spacing.