https://bugs.kde.org/show_bug.cgi?id=434093

            Bug ID: 434093
           Summary: loss of highlighting in snippets
           Product: kate
           Version: 20.12.2
          Platform: Manjaro
                OS: Linux
            Status: REPORTED
          Severity: normal
          Priority: NOR
         Component: plugin-snippets
          Assignee: kwrite-bugs-n...@kde.org
          Reporter: hr.keu...@gmail.com
  Target Milestone: ---

Created attachment 136450
  --> https://bugs.kde.org/attachment.cgi?id=136450&action=edit
Highlighting after deleting lines

SUMMARY
Highlighting of fields in multiline snippets is not shown when a line is
deleted. Also you can not tab through fields if you delete more than 1 line.

STEPS TO REPRODUCE
1. Create a multiline snippet
i.e.
'''
@book{${bibkey},
  author    = {${author}},
  editor    = {${editor}},
  title     = {${title}},
  series    = {${series}},
  number    = {${number}},
  publisher = {${publisher}},
  year      = {${year}},
  pagetotal = {${pagetotal}},
  file      = {:${file}:PDF},
  url       = {${url}},
  edition   = {${edition}},
  abstract  = {${abstract}},
  groups    = {${groups}},
}

${cursor}
'''

2. use snippet, tab to a random line
3. delete one line (using ctrl+d)
4. delete the next line as well (using ctrl+d)

OBSERVED RESULT
After 3: The fields after the deleted lines lose their highlighting. You can
still tab trough the fields. Highlighting above the deleted line is still
shown.
After 4: You can not tab any further. If you place the cursor in a field you
can tab until the place you deleted the lines from. This Problem is not new,
but persists as long as I use the snippet plugin (Sorry for not reporting).

EXPECTED RESULT
after 3: Highlighting of all remaining fields persists.
after 4: You can tab through all the fields.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Linux Thinkpad 5.10.18-1-MANJARO #1 SMP PREEMPT Tue Feb 23
18:07:15 UTC 2021 x86_64 GNU/Linux
(available in About System)
KDE Plasma Version: 5.21.1
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kate Version: 20.12.2

ADDITIONAL INFORMATION

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to