Bug 311232

Summary: A search for previous matches ignores spaces
Product: [Applications] okular Reporter: Алексей Шилин <rootlexx>
Component: generalAssignee: Okular developers <okular-devel>
Status: RESOLVED FIXED    
Severity: normal CC: aacid
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
URL: http://www.postgresql.org/files/documentation/pdf/8.4/postgresql-8.4-A4.pdf
Latest Commit: Version Fixed In: 4.9.5

Description Алексей Шилин 2012-12-06 00:00:16 UTC
Let's assume you want to search for a word "in" within a document in Okular. To do that you enter " in " into the search field (with surrounding spaces). While searching forward works fine, searching for previous matches seems to ignore surrounding spaces, thus producing results, where "in" is just a part of a word.

Reproducible: Always

Steps to Reproduce:
1. Open the URL above in Okular.
2. Search for " in ". The first match is at page 2.
3. Click Next. You are now at page 6.
4. Click Previous.
Actual Results:  
You are still at page 6, and the search result doesn't match the search query.

Expected Results:  
Okular should have found the first match at page 2.

I'm using Okular 0.10.5 as in Debian squeeze. Okular 0.14.3 was tested and is affected too. Newer versions were not tested.
Comment 1 Albert Astals Cid 2012-12-12 22:41:13 UTC
Git commit 2002e0a4b0ae5408ea0ba9ff63243fb45940d1ca by Albert Astals Cid.
Committed on 12/12/2012 at 23:39.
Pushed by aacid into branch 'KDE/4.9'.

Do not ignore spaces on backwards search

This ports a change we made to the forward search 4 years ago...
7183c172c22933387359edee33755dc6b7b0af26 for more reference
FIXED-IN: 4.9.5

M  +0    -10   core/textpage.cpp

http://commits.kde.org/okular/2002e0a4b0ae5408ea0ba9ff63243fb45940d1ca