texstudio-org/texstudio

wrong length of edit line width

Open

#3,867 opened on Nov 3, 2024

View on GitHub
 (7 comments) (0 reactions) (0 assignees)C++ (397 forks)auto 404
enhancementhelp wanted

Repository metrics

Stars
 (3,516 stars)
PR merge metrics
 (Avg merge 5h 26m) (19 merged PRs in 30d)

Description

Environment

  • TeXstudio: 4.8.5beta1 latest local msys2 build (without last 3 commits regarding hidden files)
  • Qt: latest msys2 (mingw-w64-ucrt-x86_64-qt6-base 6.8.0-2)
  • OS: Windows(10)
  • TeX distribution: miktex

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

Contributor guide