Bug 137687 - Count words and symbols show incorrect after change text
Summary: Count words and symbols show incorrect after change text
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.0 all versions
Hardware: All Windows (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Word-Count
  Show dependency treegraph
 
Reported: 2020-10-22 19:53 UTC by seven
Modified: 2025-04-10 04:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Image to display place where error I found (49.76 KB, image/png)
2020-10-22 19:55 UTC, seven
Details
Test.137687.-.Status.Bar.Not.Changing.on.Highlight.Delete (18.10 KB, application/vnd.oasis.opendocument.text)
2025-04-10 04:54 UTC, Tex2002ans
Details

Note You need to log in before you can comment on or make changes to this bug.
Description seven 2020-10-22 19:53:24 UTC
Description:
When i delete some text I not see update statistic

Steps to Reproduce:
1. Create writer document and write some text in one or two lines
2. Select and delete random text
3. See statistic not updated

Actual Results:
Statistic not updated

Expected Results:
Statistic updated


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.2.2 (x64)
Build ID: 8349ace3c3162073abd90d81fd06dcfb6b36b994
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); ИП: ru-RU
Calc: threaded
Comment 1 seven 2020-10-22 19:55:20 UTC
Created attachment 166644 [details]
Image to display place where error I found
Comment 2 davidjaynewyork 2020-10-30 02:10:08 UTC
Thank you for reporting the bug. I can confirm that the bug is present in

Version: 7.0.3.1
Build ID: d7547858d014d4cf69878db179d326fc3483e082
CPU threads: 4; OS: Mac OS X 10.10.5; UI render: default; VCL: osx
Locale: en-US (en.UTF-8); UI: en-US
Calc: threaded
Comment 3 BogdanB 2020-12-20 21:10:07 UTC
I tested with 
Version: 7.2.0.0.alpha0+
Build ID: e57665ea6f812aff9fc87073ce947f40a8b26e9d
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded

It seems it is working.

Please retest it on this version.
Comment 4 QA Administrators 2022-12-21 03:20:14 UTC Comment hidden (obsolete)
Comment 5 Kira Tubo 2023-10-13 06:13:35 UTC
Still reproducible in daily master build. The steps for reproduction are quite specific, at least in my case: 

1. Open Writer
2. Type some text e.g. "We are deleting words in this sentence"
3. Place cursor to the right of any word e.g. after the word "deleting"
4. Use CTRL+SHIFT+LEFT to select the word (note that this selects the word from right to left)
5. Press Backspace

Actual Result: the selected number of words/characters is still displayed: "Selected: x words, x characters". 

Expected Result: displays total number of words/characters remaining in document: "x words, x characters"

Notes: 
- This issue only occurs if the word is selected from right to left. If the word is selected from left to right, then deleted, the total number of words/characters is updated correctly
- After step 5, if the user moves the cursor elsewhere (for example, by moving the arrow keys), the total number of words/characters is displayed correctly

--------------

Reproduced in:

Version 4.0.0.0.beta1 (Build ID: 87906242e87d3ddb2ba9827818f2d1416d80cc7)

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1ec2e39cf4d5fe0a592bc783fd8bcdc4345c8cbd
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 6 Tex2002ans 2025-04-10 04:54:40 UTC
Created attachment 200265 [details]
Test.137687.-.Status.Bar.Not.Changing.on.Highlight.Delete

Followed all the steps in Comment 5.

Still happens in:

Version: 25.2.2.2 (X86_64) / LibreOffice Community
Build ID: 7370d4be9e3cf6031a51beef54ff3bda878e3fac
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

- - -

I also attached a very basic ODT document with Comment 5's sample text, expanded:

> We are deleting words in this sentence
> We are  deleting words in this sentence
> We are   deleting words in this sentence

Only difference being 1->3 spaces between "are" and "deleting".

- - - - - - -

# NOTES ON TESTING

Another few oddities that occur...

1. It happens with THE MOUSE highlighting too.
-- It doesn't just happen with keyboard CTRL+SHIFT+LEFT (or SHIFT+LEFT).
2. Seems much more common with Right-to-Left.
3. Can ALSO occur with Left-to-Right.
-- See ISSUE 2 below.
4. SPACE is treated different too!
-- See ISSUE 3 + 4 + 4.1 below.

- - - - - - -

## ISSUE 1: Right-to-Left Highlighting

I'm using the middle word "deleting" as an example.

If you highlight going from:

- d->g = OK
- g->d = NOT OK

So:

- Left-to-Right = OK
--- Status bar updates fine.
- Right-to-Left = NOT OK
--- Status bar doesn't update, until cursor moves.

This is the bug as Comment 5 said.

## ISSUE 2: Deleting single letters

If you highlight the very 1st 'e' in "deleting" and press DELETE or BACKSPACE key:

- Left-to-Right = NOT OK
- Right-to-Left = NOT OK

Both status bars are stuck on showing:

- Selected: 1 word, 1 character

## ISSUE 3: Deleting SPACE

Use this sample text instead:

> We are   deleting words in this sentence

There are 3 SPACEs between the word "are" and "deleting".

If you highlight and delete:

- 1st space = NOT OK
- 2nd space = OK
- 3rd space = NOT OK

This also happens BOTH LEFT<->RIGHT highlighting.

## ISSUE 4: Overwrite entire word with SPACE

Instead of pressing the DELETE key, press SPACE to override the text.

So:

- Highlight the word "deleting".
- Press SPACE.

Result:

- Left-to-Right = OK
- Right-to-Left = NOT OK

## ISSUE 4.1: Overwrite single character with SPACE

This time:

- Select the 1st 'e' in "deleting".
- Press SPACE.

Result:

- Left-to-Right = NOT OK
- Right-to-Left = OK

!!!Now this is the exact opposite, where RTL highlight works but not LTR!!!