Make indentation/tabbing more developer friendly:

- when doing backspace, preserve the previous indentation litterally
- when having auto-indentation turned off, simply repeat the previous
  indentation litterally instead of jumping to 0
This commit is contained in:
mae
2009-09-09 13:55:11 +02:00
parent 1614d6b6b8
commit f269031b5e
3 changed files with 19 additions and 10 deletions

View File

@@ -110,6 +110,12 @@ int TabSettings::firstNonSpace(const QString &text) const
return i;
}
QString TabSettings::indentationString(const QString &text) const
{
return text.left(firstNonSpace(text));
}
int TabSettings::trailingWhitespaces(const QString &text) const
{
int i = 0;