Bug 167946 - no-break-space disappears when wrapping to another line
Summary: no-break-space disappears when wrapping to another line
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.3 release
Hardware: All All
: medium normal
Assignee: Mike Kaganski
URL:
Whiteboard: target:26.8.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Formatting-Mark
  Show dependency treegraph
 
Reported: 2025-08-13 20:53 UTC by Werner
Modified: 2026-02-07 11:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
odt-file containing examples (22.74 KB, application/vnd.oasis.opendocument.text)
2025-08-15 19:42 UTC, Werner
Details
screenshot no 1 (17.59 KB, image/png)
2025-08-15 19:43 UTC, Werner
Details
screenshot no 2 (23.25 KB, image/png)
2025-08-15 19:44 UTC, Werner
Details
screenshot no 3 (17.79 KB, image/png)
2025-08-15 19:44 UTC, Werner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Werner 2025-08-13 20:53:26 UTC
Description:
Using LO 25.2.4.3 now, I find a bad bug:

I use c for character(s) and n for no-break-space(s) here:
In older versions I cold write something like:

cccccccccccccc ccccccccccccc cccccccc nnnnnnnn,

If the line ended, so I got:

cccccccccccccc ccccccccccccc cccccccc 
nnnnnnnn, 

Now I get:

cccccccccccccc ccccccccccccc cccccccc nnnnnnnn
,

while nnnnnnn is invisible out of the "paper" and which is absolutely not, what should a no-break-space do.

Older documents of mine do trouble now!!!

In new documents I also get that (using t for tab):

ccccccncccccccccctttttttttttttttttttttttttttttttttcccnnnn
nnnnnccc

I think, the linebreak should be between the tabs, not between NO-BREAK-spaces!!!

Btw. - also the no-break-spaces are shown otherwise than before - now quite ugly with blue ringlet instead of a gray space before.
Also it seems, the width of the no-break-space increased. (?)

Steps to Reproduce:
write words (characters, c) a short before the end of the line some no-break-spaces (n) followed by , or .

Actual Results:
cccccccccccccc ccccccccccccc cccccccc nnnnnnnn
,

(while nnnnnnn is invisible out of the "paper")

Expected Results:
cccccccccccccc ccccccccccccc cccccccc 
nnnnnnnn, 




Reproducible: Always


User Profile Reset: No

Additional Info:
Older documents of mine do trouble now!!!

In new documents I also get that (using t for tab):

ccccccncccccccccctttttttttttttttttttttttttttttttttcccnnnn
nnnnnccc

I think, the linebreak should be between the tabs, not between NO-BREAK-spaces!!!

Btw. - also the no-break-spaces are shown otherwise than before - now quite ugly with blue ringlet instead of a gray space before.
Also it seems, the width of the no-break-space increased. (?)
Comment 1 m_a_riosv 2025-08-13 23:29:02 UTC
Please attach a sample file, reduce the size as much as possible without private information,
and paste the information in Menu/Help/About LibreOffice, there is a copy icon.
Comment 2 Werner 2025-08-15 19:42:50 UTC
Created attachment 202340 [details]
odt-file containing examples

screenshots will follow
Comment 3 Werner 2025-08-15 19:43:56 UTC
Created attachment 202341 [details]
screenshot no 1
Comment 4 Werner 2025-08-15 19:44:19 UTC
Created attachment 202342 [details]
screenshot no 2
Comment 5 Werner 2025-08-15 19:44:49 UTC
Created attachment 202343 [details]
screenshot no 3
Comment 6 QA Administrators 2025-11-25 15:39:44 UTC Comment hidden (obsolete)
Comment 7 Buovjaga 2026-02-04 17:22:16 UTC
(In reply to Werner from comment #3)
> Created attachment 202341 [details]
> screenshot no 1

Note for others wondering: the blank before the period and "ignored" is due to the Aufgabe style having first line indent of -0,60 cm.

I bibisected with linux-64-6.2. The no-break spaces started disappearing when wrapping to the second line in commit 4bb28ad217ea9d6511b6921dcd3d28328edcb4d6
tdf#120677: restore treatment of blanks in SwTextGuess::Guess

Let's ask Mike what he thinks.
Comment 8 Mike Kaganski 2026-02-04 18:48:31 UTC
If this will be restricted only to

> I use c for character(s) and n for no-break-space(s) here:
> In older versions I cold write something like:
> 
> cccccccccccccc ccccccccccccc cccccccc nnnnnnnn,
> 
> If the line ended, so I got:
> 
> cccccccccccccc ccccccccccccc cccccccc 
> nnnnnnnn, 
> 
> Now I get:
> 
> cccccccccccccc ccccccccccccc cccccccc nnnnnnnn
> ,
> 
> while nnnnnnn is invisible out of the "paper" and which is absolutely not,
> what should a no-break-space do.

then I'm inclined to consider this as a real regression.

The problem with tabs is pre-existing, and must be considered separately.

And "quite ugly" look of NBSP is (1) separate, (2) opinionated, and (3) IIRC, configurable.

Decide on resolution.
Comment 9 Buovjaga 2026-02-04 18:53:29 UTC
(In reply to Mike Kaganski from comment #8)
> If this will be restricted only to
> 
> > I use c for character(s) and n for no-break-space(s) here:
> > In older versions I cold write something like:
> > 
> > cccccccccccccc ccccccccccccc cccccccc nnnnnnnn,
> > 
> > If the line ended, so I got:
> > 
> > cccccccccccccc ccccccccccccc cccccccc 
> > nnnnnnnn, 
> > 
> > Now I get:
> > 
> > cccccccccccccc ccccccccccccc cccccccc nnnnnnnn
> > ,
> > 
> > while nnnnnnn is invisible out of the "paper" and which is absolutely not,
> > what should a no-break-space do.
> 
> then I'm inclined to consider this as a real regression.

Sure let's focus on this.
Comment 10 Mike Kaganski 2026-02-07 10:16:40 UTC
https://gerrit.libreoffice.org/c/core/+/198882
Comment 11 Commit Notification 2026-02-07 11:15:54 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e3c068cb190e6cf04a49f9984f984d5ef72f9d9a

tdf#167946: reimplement the fix for tdf#120677

It will be available in 26.8.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.