fix bug #336854: Haskell wrong tab autoindentation

Review Request #119445 - Created July 23, 2014 and submitted

Information
Martin Walch
kate
336854
Reviewers
kate

The problem lies in the haskell auto-indenter (haskell.js). The JavaScript search function for strings does not return a "virtual" position, but counts tabs as single characters.

To fix this, remove the leading whitespace with stripWhiteSpace() before getting the position of the '|' character. Later add the virtual value of the leading whitespace using the katepart API function document.firstVirtualColumn().

Apply this also to other rules where appropriate.

Bump revision number.

Patch successfully applied to kate KDE/4.14.

Test case worked fine after patching.

Björn Peemöller
Christoph Cullmann
Martin Walch
Martin Walch
Review request changed

Status: Closed (submitted)

Loading...