Mercurial > emacs
comparison src/xterm.c @ 107991:74557d25410e
Implement cursor on the left fringe for R2L lines.
xdisp.c (IT_OVERFLOW_NEWLINE_INTO_FRINGE): For R2L lines,
consider the left fringe, not the right one.
(set_cursor_from_row): Don't reverse pos_before and pos_after for
reversed glyph rows. Set cursor.x to negative value when the
cursor might be on the left fringe.
(extend_face_to_end_of_line): Append the stretch glyph only if its
width is positive.
(notice_overwritten_cursor, draw_phys_cursor_glyph)
(erase_phys_cursor): For reversed cursor_row, support cursor on
the left fringe.
w32term.c (w32_draw_window_cursor): For reversed glyph rows,
draw cursor on the left fringe.
xterm.c (x_draw_window_cursor): For reversed glyph rows, draw
cursor on the left fringe.
fringe.c (draw_fringe_bitmap): For reversed glyph rows, allow
cursor on the left fringe.
dispnew.c (update_text_area): Handle reversed desired rows when
the cursor is on the left fringe.
(set_window_cursor_after_update): Limit cursor's hpos by -1 from
below, not by 0, for when the cursor is on the left fringe.
author | Eli Zaretskii <eliz@gnu.org> |
---|---|
date | Sat, 10 Apr 2010 19:28:30 +0300 |
parents | 04b6d1cf4d69 |
children | 4d8277a44bb4 |
comparison
equal
deleted
inserted
replaced
107990:aec214e3b4dd | 107991:74557d25410e |
---|---|
7490 { | 7490 { |
7491 w->phys_cursor_type = cursor_type; | 7491 w->phys_cursor_type = cursor_type; |
7492 w->phys_cursor_on_p = 1; | 7492 w->phys_cursor_on_p = 1; |
7493 | 7493 |
7494 if (glyph_row->exact_window_width_line_p | 7494 if (glyph_row->exact_window_width_line_p |
7495 && w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA]) | 7495 && (glyph_row->reversed_p |
7496 ? (w->phys_cursor.hpos < 0) | |
7497 : (w->phys_cursor.hpos >= glyph_row->used[TEXT_AREA]))) | |
7496 { | 7498 { |
7497 glyph_row->cursor_in_fringe_p = 1; | 7499 glyph_row->cursor_in_fringe_p = 1; |
7498 draw_fringe_bitmap (w, glyph_row, 0); | 7500 draw_fringe_bitmap (w, glyph_row, glyph_row->reversed_p); |
7499 } | 7501 } |
7500 else | 7502 else |
7501 switch (cursor_type) | |
7502 { | 7503 { |
7503 case HOLLOW_BOX_CURSOR: | 7504 switch (cursor_type) |
7504 x_draw_hollow_cursor (w, glyph_row); | 7505 { |
7505 break; | 7506 case HOLLOW_BOX_CURSOR: |
7506 | 7507 x_draw_hollow_cursor (w, glyph_row); |
7507 case FILLED_BOX_CURSOR: | 7508 break; |
7508 draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR); | 7509 |
7509 break; | 7510 case FILLED_BOX_CURSOR: |
7510 | 7511 draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR); |
7511 case BAR_CURSOR: | 7512 break; |
7512 x_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR); | 7513 |
7513 break; | 7514 case BAR_CURSOR: |
7514 | 7515 x_draw_bar_cursor (w, glyph_row, cursor_width, BAR_CURSOR); |
7515 case HBAR_CURSOR: | 7516 break; |
7516 x_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR); | 7517 |
7517 break; | 7518 case HBAR_CURSOR: |
7518 | 7519 x_draw_bar_cursor (w, glyph_row, cursor_width, HBAR_CURSOR); |
7519 case NO_CURSOR: | 7520 break; |
7520 w->phys_cursor_width = 0; | 7521 |
7521 break; | 7522 case NO_CURSOR: |
7522 | 7523 w->phys_cursor_width = 0; |
7523 default: | 7524 break; |
7524 abort (); | 7525 |
7526 default: | |
7527 abort (); | |
7528 } | |
7525 } | 7529 } |
7526 | 7530 |
7527 #ifdef HAVE_X_I18N | 7531 #ifdef HAVE_X_I18N |
7528 if (w == XWINDOW (f->selected_window)) | 7532 if (w == XWINDOW (f->selected_window)) |
7529 if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMPreeditPosition)) | 7533 if (FRAME_XIC (f) && (FRAME_XIC_STYLE (f) & XIMPreeditPosition)) |