src/nvim/screen.c
/// Correct a position on the screen, if it's the right half of a double-wide
/// char move it to the left half.  Returns the corrected column.
Correct a position on the screen, if it's the right half of a double-wide
char move it to the left half.  Returns the corrected column.
Correct a position on the screen if it ' s the right half of a double - wide char move it to the left half . Returns the corrected column .
int grid_fix_col(ScreenGrid *grid, int col, int row)
{
  int coloff = 0;
  screen_adjust_grid(&grid, &row, &coloff);
  col += coloff;
  if (grid->chars != NULL && col > 0
      && grid->chars[grid->line_offset[row] + col][0] == 0) {
    return col - 1 - coloff;
  }
  return col - coloff;
}
int grid_fix_col ( ScreenGrid * grid , int col , int row ) { int coloff = 0 ; screen_adjust_grid ( & grid , & row , & coloff ) ; col += coloff ; if ( grid -> chars != NULL && col > 0 && grid -> chars [ grid -> line_offset [ row ] + col ] [ 0 ] == 0 ) { return col - 1 - coloff ; } return col - coloff ; }
Correct a position on the screen, if it's the right half of a double-wide
char move it to the left half.
Correct a position on the screen if it ' s the right half of a double - wide char move it to the left half .