Save current cursor position.
166779
def cursor_save_attrs (self): # <ESC>7
        ''''''

        self.cur_saved_r = self.cur_r
        self.cur_saved_c = self.cur_c
682086
def lf (self):
        '''
        '''

        old_r = self.cur_r
        self.cursor_down()
        if old_r == self.cur_r:
            self.scroll_up ()
            self.erase_line()
229315
def cursor(self, visible=None, size=None):
        '''
        info = CONSOLE_CURSOR_INFO()
        if self.GetConsoleCursorInfo(self.hout, byref(info)):
            if visible is not None:
                info.bVisible = visible
            if size is not None:
                info.dwSize = size
            self.SetConsoleCursorInfo(self.hout, byref(info))
145549
def cursor_pos(self):
        """"""
        if len(self) == 0:
            return self.left + self.default_text.get_width()

        papy = self._surface.get_width()
        if papy > self.w:
            shift = papy - self.width
        else:
            shift = 0

        return self.left + self.font.size(self.shawn_text[:self.cursor])[0] - shift
1192174
protected void onCursorUpdated()
	{
		if (getParent() == null)
			return;

		startTimer = System.currentTimeMillis();
		//- 4 because Padding.of(2) for clipping
		if (text.length() == 0)
			xOffset = 0;
		else if (cursor.x <= -xOffset)
			xOffset = -cursor.x;
		else if (cursor.x >= innerSize().width() - xOffset)
			xOffset = Math.min(innerSize().width() - cursor.x - 4, 0);
		else if (guiText.size().width() <= innerSize().width() - xOffset - 5)
			xOffset = Math.min(innerSize().width() - guiText.size().width() - 4, 0);
	}
301205
def _fix_vi_cursor_position(self, event):
        
        cli = self._cli_ref()
        if cli:
            buff = cli.current_buffer
            preferred_column = buff.preferred_column

            if (ViNavigationMode()(event.cli) and
                    buff.document.is_cursor_at_the_end_of_line and
                    len(buff.document.current_line) > 0):
                buff.cursor_position -= 1

                # Set the preferred_column for arrow up/down again.
                # (This was cleared after changing the cursor position.)
                buff.preferred_column = preferred_column
674165
def cursor_position(self):
        
        return (self._editor.textCursor().blockNumber(),
                self._editor.textCursor().columnNumber())
258285
def go_to_position(self, position):
        

        cursor = self.textCursor()
        cursor.setPosition(position)
        self.setTextCursor(cursor)
        return True
1007043
def get_cursor_position(self, file_path):
        
        try:
            map = json.loads(self._settings.value('cachedCursorPosition'))
        except TypeError:
            map = {}
        try:
            pos = map[file_path]
        except KeyError:
            pos = 0
        if isinstance(pos, list):
            # changed in pyqode 2.6.3, now we store the cursor position
            # instead of the line and column  (faster)
            pos = 0
        return pos
1370063
def _cursor_back(self, value):
        
        if value <= 0:
            value = 1
        self._cursor.movePosition(self._cursor.Left, self._cursor.MoveAnchor, value)
        self._text_edit.setTextCursor(self._cursor)
        self._last_cursor_pos = self._cursor.position()
896410
def cursor_position_changed(self):
        """"""
        log.debug("cursor_position_changed")

        cur = self.textCursor()
        log.debug(cur.position())
        log.debug(cur.selectedText())
        if len(cur.selectedText()) == 0:
            cur.select(QtGui.QTextCursor.WordUnderCursor)
            self.setTextCursor(cur)
1109803
void showCursor () {
		updateCurrentLine();
		if (cursorLine != firstLineShowing) {
			int step = cursorLine >= firstLineShowing ? 1 : -1;
			while (firstLineShowing > cursorLine || firstLineShowing + linesShowing - 1 < cursorLine) {
				firstLineShowing += step;
			}
		}
	}
240191
def save(self):
        
        e = self.editor

        self._style = e.current_style
        self._show_line_numbers = e.show_line_numbers
        self._highlight_search = e.highlight_search
        self._show_ruler = e.show_ruler
        self._relative_number = e.relative_number
        self._cursorcolumn = e.cursorcolumn
        self._cursorline = e.cursorline
        self._colorcolumn = e.colorcolumn
243455
def set_cursor_position(self, position):
        """"""
        position = self.get_position(position)
        cursor = self.textCursor()
        cursor.setPosition(position)
        self.setTextCursor(cursor)
        self.ensureCursorVisible()
611683
protected function moveCursorToTop()
    {
        $output = $this->util->cursor->up($this->checkboxes->count() - 1);
        $output .= $this->util->cursor->startOfCurrentLine();

        $this->output->sameLine()->write($output);
    }
307388
def move_cursor(row = nil)
      if row
        if (prev_item = items[current_row])
          main.draw_item prev_item
        end
        page = row / max_items
        switch_page page if page != current_page
        main.activate_pane row / maxy
        @current_row = row
      else
        @current_row = 0
      end

      item = items[current_row]
      main.draw_item item, current: true
      main.display current_page

      header_l.draw_current_file_info item
      @current_row
    end
370559
private void moveCursorToNextLine() {
        cursorPosition = cursorPosition.withColumn(0).withRelativeRow(1);
        if(cursorPosition.getRow() >= currentTextBuffer.getLineCount()) {
            currentTextBuffer.newLine();
        }
        trimBufferBacklog();
        correctCursor();
    }