Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-15512

Special chars not escaped when used in replace pattern

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Not Evaluated
    • Qt Creator 4.0.0-beta1
    • Qt Creator 3.5.1
    • FakeVim
    • None
    • 40edcd081348d57619a651cd252128a85692958f

    Description

      When replacing text with the :s command, if there is a special escaped character (such as "\t" for tab) in the replacement pattern, then fakevim actually puts "t" (without the ).

      This only affects special chars in the replacement pattern, not in the search pattern, so for example this one works as expected:
      :.s/\t/X/g
      (replace all tabs by X – note that searching a pattern such as /\t also works correctly)

      But this one doesn't work:
      :.s/X/\t/g
      (should replace all X by tabs, but actually replaces all X by t)

      This cannot be worked around by escaping the \ char as this puts a literal \ in the result, as expected:
      :.s/X/
      t/g
      (replaces all X by the literal characters "\t")

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            hjk hjk
            rmoyen RĂ©mi Moyen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes