texstudio-org / texstudio

TeXstudio is a fully featured LaTeX editor. Our goal is to make writing LaTeX documents as easy and comfortable as possible.
http://www.texstudio.org/
GNU General Public License v3.0
2.82k stars 345 forks source link

Hard Line Breaks... doesn't use full line width #3867

Open octaeder opened 4 days ago

octaeder commented 4 days ago

Environment

Expected behavior

Using Idefix>Hard Line Break... from main menu should use whole line.

Actual behavior

In the upper half of the image you see a before-after-demo for txs 4.8.2 installed (same results up to alpha1 portable, beta1 port. not testable), while the lower half is from 4.8.5beta1 (local msys2 build, s. above). The latex code (given at the end) is pasted from the clipboard into a new editor.

image

As you can see, after applying Hard Line Breaks the text still uses the full line width in the first case. In the second case enough space for the next word remains at the end of the line after applying the function (and line seems to be longer). It may be important to test beta1 because Qt 6.8.0 (not 6.8.0-2) is used there.

How to reproduce

Editor Setup

Font Family: JetBrains Mono Font Size: 9 Line Spacing: 100%

Adv. Editor Setup

Line Wrapping: Soft Line Wrap after max. Characters Maximal Characters: 160

Hard Line Break...

... so many characters: 160 Smart scope selecting: checked Join lines before wrapping: checked

latex code ```latex \documentclass[10pt,a5paper]{article} \begin{document} Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, \end{document} ```
sunderme commented 4 days ago

looks like a rounding issue. As it is rather cosmetic and I really don't like to hard line wrap, a leave it for someone else to igre out.