bugGNU Octave - Bugs: bug #44039, GUI editor: "Find...

 
 

bug #44039: GUI editor: "Find Previous" finds only one occurrence in a line

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Sun 18 Jan 2015 07:01:03 PM UTC
   
 
Category:  GUI Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Closed
Release:  * dev Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 19 Jan 2015 08:48:59 PM UTC, comment #5: 

Thanks for fixing - works fine

Philip Nienhuis <philipnienhuis>
Group Member
Sun 18 Jan 2015 09:58:39 PM UTC, comment #4: 

Thanks for the report.
The code lines you have posted is for searching from the end. The bug was just a few lines below. It should be fixed with cset
http://hg.savannah.gnu.org/hgweb/octave/rev/7bb80c927af5

Torsten Lilge <ttl>
Group Member
Sun 18 Jan 2015 08:09:04 PM UTC, comment #3: 

in file octave/libgui/src/m-editor/find-dialog.cc


         if (do_forward)
            {
              line = 0;
              col = 0;
            }
          else
            {
              line = _edit_area->lines () - 1;
              col  = _edit_area->text (line).length () - 1;
              if (col == -1)
                col = 0;
            }
        }


Does the line

 line = _edit_area->lines () - 1;

causes the movement to the previous line?

Avinoam Kalma <avinoam>
Group Member
Sun 18 Jan 2015 08:06:07 PM UTC, comment #2: 

title slightly adapted

Philip Nienhuis <philipnienhuis>
Group Member
Sun 18 Jan 2015 08:01:24 PM UTC, comment #1: 

Confirmed on latest gui-release  (f9a944b9e1cb "provide a user preference for printing the debug location in the terminal")

"Find next" works fine; "Find previous" only finds the last occurrence in a line and skips earlier matches on the same line.

Philip Nienhuis <philipnienhuis>
Group Member
Sun 18 Jan 2015 07:01:03 PM UTC, original submission:  


Using Find Previous in the "Find and Replace" GUI menu,
it find only single occurrence of the string in each line,
and jumps to the previous line

Avinoam Kalma <avinoam>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by ttl (Posted a comment)
  • -email is unavailable- added by avinoam (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-01-18 ttl StatusConfirmed Fixed
        Open/ClosedOpen Closed
    2015-01-18 philipnienhuis SummaryFind Previous find only one occurrence in a line GUI editor: "Find Previous" finds only one occurrence in a line
    2015-01-18 philipnienhuis StatusNone Confirmed

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code