Kate
katevirange.cpp
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #include "katevirange.h"
00021
00022 KateViRange::KateViRange( int slin, int scol, int elin, int ecol, ViMotion::MotionType inc )
00023 : startLine( slin ), startColumn( scol ), endLine( elin ), endColumn( ecol ), motionType( inc )
00024 {
00025 valid = true;
00026 jump = false;
00027 }
00028
00029
00030
00031 KateViRange::KateViRange( int elin, int ecol, ViMotion::MotionType inc )
00032 : endLine( elin ), endColumn( ecol ), motionType( inc )
00033 {
00034 startLine = -1;
00035 startColumn = -1;
00036 valid = true;
00037 jump = false;
00038 }
00039
00040 KateViRange::KateViRange()
00041 {
00042 startLine = -1;
00043 startColumn = -1;
00044 endLine = -1;
00045 endColumn = -1;
00046 valid = true;
00047 jump = false;
00048 motionType = ViMotion::InclusiveMotion;
00049 }
00050
00051 void KateViRange::normalize()
00052 {
00053 if ( startLine > endLine || ( startLine == endLine && startColumn > endColumn ) ) {
00054 int tempC, tempL;
00055 tempL = startLine;
00056 tempC = startColumn;
00057
00058 startLine = endLine;
00059 startColumn = endColumn;
00060 endLine = tempL;
00061 endColumn = tempC;
00062 }
00063 }