Bug 361538 - Text selection misses some characters
Summary: Text selection misses some characters
Status: CONFIRMED
Alias: None
Product: okular
Classification: Applications
Component: general (show other bugs)
Version: 21.04.2
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-09 00:38 UTC by Jonathan
Modified: 2021-07-13 09:51 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
A trivial test file where the issue can be reproduced. (11 bytes, text/plain)
2016-05-14 05:57 UTC, Jonathan
Details
Problem doesn't happen with PDF. (7.23 KB, text/pdf)
2016-05-14 05:57 UTC, Jonathan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan 2016-04-09 00:38:54 UTC
Using either the txt or the odt backend, selected text (either using the selection or the text selection tool) sometimes ignores the final character on a line. I have identified two cases when this happens:

1. If the line contains no white space and is forced to wrap at a non-whitespace character, the final character on the line before the wrap will not be selected.

2. If the file does not contain a final line terminator, the last character on the last line is not selected.

Reproducible: Always

Steps to Reproduce:
1. Make a simple text or ODT file, for example containing the words 'Hello world' but no line terminator.
2. Load the file into okular
3. Select the final characters of the displayed line.

Actual Results:  
Characters selected do not include the final character on the line.

Expected Results:  
Characters selected should include the final character on the line.
Comment 1 Albert Astals Cid 2016-05-11 22:21:38 UTC
for completion, could you upload such a file?
Comment 2 Jonathan 2016-05-14 05:57:12 UTC
Created attachment 98952 [details]
A trivial test file where the issue can be reproduced.

I notice that the problem does not happen with PDF files.
Comment 3 Jonathan 2016-05-14 05:57:56 UTC
Created attachment 98954 [details]
Problem doesn't happen with PDF.
Comment 4 Albert Astals Cid 2017-02-13 23:29:23 UTC
file was provided
Comment 5 Justin Zobel 2020-11-10 03:49:05 UTC
Thanks for the report Jonathan.

I've just tested this on the latest Okular with a single line text file and cannot reproduce this issue.

Can you please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I'm setting status to "needsinfo" pending your response, please change back to "reported" when you respond, thanks.
Comment 6 Jonathan 2020-11-24 04:40:39 UTC
Still happens to me, at least with Okular version 1.11.3
Comment 7 Laura David Hurka 2021-07-13 09:51:02 UTC
Does happen here.

Input .txt document:

abcdefabcdef[...]abcdefabcdef

Text selection result:

abcdefabcdefabcdefabcd
fabcdefabcdef[...]abcdefabc

→ The e is missing.

Could not reproduce with PDF.

Maybe related to the text entity reordering problem, see See Also.