Bug 135761 - EDITING: Ctrl+Backspace between two spaces erases the space to the right
Summary: EDITING: Ctrl+Backspace between two spaces erases the space to the right
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium minor
Assignee: Andreas Heinisch
URL:
Whiteboard: target:7.5.0 target:7.4.0.2
Keywords:
Depends on:
Blocks: Cell-Edit-Mode
  Show dependency treegraph
 
Reported: 2020-08-14 12:26 UTC by LeroyG
Modified: 2022-07-27 08:10 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
cells with targets and results with different space classes (13.63 KB, application/vnd.oasis.opendocument.spreadsheet)
2020-08-14 12:30 UTC, LeroyG
Details

Note You need to log in before you can comment on or make changes to this bug.
Description LeroyG 2020-08-14 12:26:55 UTC
Description:
While editting a cell which has two consecutives spaces, if the cursor is between them, pressing `Ctrl+Backspace` erases only the space to the right, not the space and word to the left.

Steps to Reproduce:
1. Type a, space, space, b in a cell.
2. Edit the cell, and place the cursor between the two spaces.
3. Press `Ctrl+Backpace`.

Actual Results:
The space to the right is erased.

Expected Results:
The space and the word to the left are erased.


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
Behavior changes with non-breaking spaces and with narrow no-break spaces.

If "narrow no-break space" is to the left of the cursor:
Actual result: only the "narrow no-break space" to the left is erased.
Expected result: the "narrow no-break space" and word to the left are erased.

Related: https://bugs.documentfoundation.org/show_bug.cgi?id=135451
Comment 1 LeroyG 2020-08-14 12:30:08 UTC
Created attachment 164314 [details]
cells with targets and results with different space classes

The non-breaking space and narrow no-break space were inserted choosing menu Insert - Formatting Mark.
Comment 2 Buovjaga 2021-03-31 14:57:03 UTC
Reproduced already with 3.3.0 on Windows 10

Arch Linux 64-bit
Version: 7.2.0.0.alpha0+ / LibreOffice Community
Build ID: ec44f87d5b99a3299322d0b79abc4c6808877865
CPU threads: 8; OS: Linux 5.11; UI render: default; VCL: kf5
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 31 March 2021
Comment 3 LeroyG 2021-11-09 12:18:27 UTC
Same at
Version: 7.1.7.2 (x86) / LibreOffice Community
Build ID: c6a4e3954236145e2acb0b65f68614365aeee33f
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: es-MX (es_MX); UI: en-US
Calc: threaded
Comment 4 LeroyG 2022-05-27 13:22:19 UTC
Reproducible with:

Version: 7.4.0.0.alpha1 (x86) / LibreOffice Community
Build ID: b871abad383583f02eb49c7e49aeae01f6941072
CPU threads: 4; OS: Windows 6.1 Service Pack 1 Build 7601; UI render: Skia/Raster; VCL: win
Locale: es-MX (es_MX); UI: es-ES
Calc: threaded
Comment 5 Andreas Heinisch 2022-07-15 14:57:46 UTC
Should we just jump over whitespaces or all non visible characters?

Current patch (https://gerrit.libreoffice.org/c/core/+/137108) deletes only one whitespace at the left ( | indicates cursor )

"a | b" CTRL+Backspace "a| b" OR should it be "| b"?
Comment 6 LeroyG 2022-07-20 21:36:46 UTC
(In reply to Andreas Heinisch from comment #5)
> Should we just jump over whitespaces or all non visible characters?

IMHO, it must work similar to Writer.

> Current patch (https://gerrit.libreoffice.org/c/core/+/137108) deletes only
> one whitespace at the left ( | indicates cursor )
> 
> "a | b" CTRL+Backspace "a| b" OR should it be "| b"?

I think that, for consistency, it should be "| b".

Just think how it works when you press <Ctrl>+<Left arrow>. Or, conversely, what happens if you press <Ctrl>+<Del>.
Comment 7 Commit Notification 2022-07-23 10:36:43 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9a612ce3d1d025d5f553cc348feaedeea37fc822

tdf#135761 - Calc cell editing: change search preference for the word boundary

It will be available in 7.5.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.
Comment 8 Commit Notification 2022-07-27 08:10:11 UTC
Andreas Heinisch committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

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

tdf#135761 - Calc cell editing: change search preference for the word boundary

It will be available in 7.4.0.2.

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.