コード例 #1
0
ファイル: ui.c プロジェクト: qvacua/neovim
void ui_line(int row, int startcol, int endcol, int clearcol, int clearattr,
             bool wrap)
{
  size_t off = LineOffset[row]+(size_t)startcol;
  UI_CALL(raw_line, 1, row, startcol, endcol, clearcol, clearattr, wrap,
          (const schar_T *)ScreenLines+off, (const sattr_T *)ScreenAttrs+off);
  if (p_wd) {  // 'writedelay': flush & delay each time.
    int old_row = row, old_col = col;
    // If'writedelay is active, we set the cursor to highlight what was drawn
    ui_cursor_goto(row, MIN(clearcol, (int)Columns-1));
    ui_flush();
    uint64_t wd = (uint64_t)labs(p_wd);
    os_microdelay(wd * 1000u, true);
    ui_cursor_goto(old_row, old_col);
  }
}
コード例 #2
0
ファイル: ui.c プロジェクト: Alok/neovim-1
static void ui_linefeed(void)
{
  int new_col = 0;
  int new_row = row;
  if (new_row < sr.bot) {
    new_row++;
  } else {
    UI_CALL(scroll, 1);
  }
  ui_cursor_goto(new_row, new_col);
}
コード例 #3
0
ファイル: ui.c プロジェクト: Alok/neovim-1
static void ui_cursor_right(void)
{
  int new_col = col + 1;
  assert(new_col < width);
  ui_cursor_goto(row, new_col);
}
コード例 #4
0
ファイル: ui.c プロジェクト: Alok/neovim-1
static void ui_cursor_left(void)
{
  int new_col = col - 1;
  assert(new_col >= 0);
  ui_cursor_goto(row, new_col);
}
コード例 #5
0
ファイル: ui.c プロジェクト: Alok/neovim-1
static void ui_carriage_return(void)
{
  int new_col = 0;
  ui_cursor_goto(row, new_col);
}