forked from qt-creator/qt-creator
		
	fakevim: fix moving to first non-blank on a line
if there are only blanks, first non-blank on line is the last position Merge-request: 99 Reviewed-by: hjk <qtc-committer@nokia.com>
This commit is contained in:
		@@ -2472,7 +2472,7 @@ void FakeVimHandler::Private::moveToFirstNonBlankOnLine()
 | 
			
		||||
    const QTextBlock &block = m_tc.block();
 | 
			
		||||
    int firstPos = block.position();
 | 
			
		||||
    for (int i = firstPos, n = firstPos + block.length(); i < n; ++i) {
 | 
			
		||||
        if (!doc->characterAt(i).isSpace()) {
 | 
			
		||||
        if (!doc->characterAt(i).isSpace() || i == n - 1) {
 | 
			
		||||
            setPosition(i);
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user