Lines Matching refs:line
120 """Return a (line, char) tuple of int indexes into self.data.
127 * line.char float: converted to 'line.char' string;
128 * 'line.char' string, where line and char are decimal integers;
129 * 'line.char lineend', where lineend='lineend' (and char is ignored);
130 * 'line.end', where end='end' (same as above);
148 line, char = index.split('.')
149 line = int(line)
151 # Out of bounds line becomes first or last ('end') index
152 if line < 1:
154 elif line > lastline:
157 linelength = len(self.data[line]) -1 # position before/at \n
159 return line, linelength
162 return line, linelength - int(m.group(1))
164 # Out of bounds char becomes first or last index of line
170 return line, char
173 '''Return position for 'end' or line overflow corresponding to endflag.
177 1: same viewed as beginning of non-existent next line (for .index)
194 line, char = self._decode(index, -1)
195 before = self.data[line][:char]
196 after = self.data[line][char:]
197 self.data[line] = before + chars[0]
198 self.data[line+1:line+1] = chars[1:]
199 self.data[line+len(chars)-1] += after
222 Adjust default index2 ('index+1) for line ends.
231 # deleting non-terminal \n, convert 'index1+1 to start of next line