octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56405] Search+Replace deleting characters dis


From: Maxim Gawrilow
Subject: [Octave-bug-tracker] [bug #56405] Search+Replace deleting characters disobeys selection
Date: Tue, 28 May 2019 07:59:46 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:67.0) Gecko/20100101 Firefox/67.0

URL:
  <https://savannah.gnu.org/bugs/?56405>

                 Summary: Search+Replace deleting characters disobeys
selection
                 Project: GNU Octave
            Submitted by: eldrad_ulthran
            Submitted on: Tue 28 May 2019 11:59:44 AM UTC
                Category: GUI
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: None
                  Status: None
             Assigned to: None
         Originator Name: 
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 5.1.0
        Operating System: GNU/Linux

    _______________________________________________________

Details:

When the Search+Replace widget of the editor is used to delete certain strings
inside a selection, deletion occurs in the whole document instead.

Steps to reproduce:

1. In the editor, mark a piece of code
2. press Ctrl-F
3. In "search for" enter any string that is present in the selection
4. Leave "Replace by" empty
5. Make sure to check "search in selection"
6. Press "replace all"

Result: All instances of the search pattern throughout the whole document are
deleted
Expected result: Deletion should occur only in the selected part.

If the search pattern is not found in the selected region, nothing happens, as
it should be. If "replace by" is not empty, everything works fine.

A possible workaround is to extend the search string with another character,
which should be kept. E.g. if there are many instances of "abc" and one wants
to delete "ab", one should not replace "ab" with "", but "abc" with "c".

Since I'm at it currently, two little changes to the search widget would be
nice:
If the widget is open and I select a new part of the code, the tick "search in
selection" gets unchecked automatically, therefore I need to re-check it
again. It would be nice if it stayed checked.
Also, the "replace all" action is done in many single replacements, therefore
undoing (Ctrl-Z) such an action can get quite tedious. It would be nice if all
replacements could be undone in a single step.




    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56405>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]