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

Special chars not escaped when used in replace pattern

XMLWordPrintable

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

      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")

        For Gerrit Dashboard: QTCREATORBUG-15512
        # Subject Branch Project Status CR V

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

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes