Fix highlighting when editing in patch review

Authored by croick on Jun 26 2017, 11:01 PM.

Description

Fix highlighting when editing in patch review

Summary:
Problems:

  • removing markers in foreach loop lead to crash (BUG 380125)
  • highlighting when editing in patch review was broken
  • reloading would stop the highlighting

Fixes:

  • textInserted/textRemoved signals only send line-by-line (or character-by-character) changes and there are extra signals for newline insertion/removal. The patch reflects this mechanism.
  • Redo the highlighting when the document is reloaded.
  • Remove one of the duplicated lists of ranges (mainly to improve maintainability).

Persisting Issue:

  • possible dangling mark when removing the "wrong" newline from a set of newline-only-lines changes.

BUG: 380125

Test Plan:

  • tested text insertion, text removal and mark clicking and the combination of those with (mostly) consistent results for a git diff

Reviewers: KDevelop, apol

Reviewed By: KDevelop, apol

Subscribers: kdevelop-devel

Differential Revision: https://phabricator.kde.org/D6398

Details

Committed
croickJun 28 2017, 10:36 PM
Reviewer
KDevelop
Differential Revision
D6398: Fix highlighting when editing in patch review
Parents
R32:22efb3534b18: Rename toKAction() to toQAction(), adapting to KAction->QAction port
Branches
Unknown
Tags
Unknown