summaryrefslogtreecommitdiff
path: root/src/xdisp.c
Commit message (Collapse)AuthorAgeFilesLines
* A better fix for bug #17777 with visual-order cursor movement.Eli Zaretskii2014-06-161-1/+4
| | | | | | | src/xdisp.c (Fmove_point_visually): Instead of testing for keyboard macro execution, make sure point didn't move since last complete redisplay, as the condition for using the glyph matrix information.
* Spelling fix.Paul Eggert2014-06-151-1/+1
|
* Fix bug #17777 with keyboard macros and visual-order cursor movement.Eli Zaretskii2014-06-141-0/+1
| | | | | | | src/xdisp.c (Fmove_point_visually): Don't use the glyph matrix information if we are in the middle of executing a keyboard macro, since redisplay doesn't update the screen until the macro is finished.
* src/xdisp.c: Enhance commentary.Eli Zaretskii2014-06-141-3/+64
|
* Fix bug #17744 with cursor motion near overlay string with 'cursor' prop.Eli Zaretskii2014-06-111-3/+3
| | | | | | src/xdisp.c (set_cursor_from_row): Fix an off-by-one error when matching overlay strings with 'cursor' property against buffer positions traversed in the glyph row.
* Fix bug #17585 with incorrect vertical motion when linum-mode is on.Eli Zaretskii2014-05-251-1/+1
| | | | | | src/xdisp.c (move_it_in_display_line_to): Don't record wrap position if we are iterating over an object that generates glyphs for marginal areas.
* * xdisp.c (safe__call1, safe__eval): Now static.Paul Eggert2014-05-241-2/+2
|
* Fix last commits in xdisp.c, which caused a crash at startup on w32.Eli Zaretskii2014-05-241-8/+17
| | | | | | | | src/xdisp.c (safe__call): Accept va_list argument instead of '...'. (safe_call, safe__call1): Construct a va_list argument for safe_call. (safe_call1): Call safe_call instead of safe__call directly. Fixes: debbugs:17577
* * src/xdisp.c: Bind inhibit-quit during pre-redisplay-function.Stefan Monnier2014-05-241-6/+25
| | | | | | | | | (safe__call, safe__call1, safe__eval): New functions. (safe_call): Use it. (prepare_menu_bars): Use it for pre-redisplay-function. (display_mode_element): Same for `:eval'. Fixes: debbugs:17577
* Fix bug #17539 with infinite recursion during scroll commands.Eli Zaretskii2014-05-211-5/+11
| | | | | | src/xdisp.c (move_it_in_display_line_to): Avoid infinite recursion: when closest_pos is identical to to_charpos, don't recurse, since we already tried that, and failed.
* Fix bug #17288 with inserting left truncation glyph under linum-mode.Eli Zaretskii2014-04-181-0/+1
| | | | | src/xdisp.c (insert_left_trunc_glyphs): Ensure the left truncation glyph is written to TEXT_AREA of the temporary glyph_row.
* Fix bug #17281 with infloop in line-pixel-height.Eli Zaretskii2014-04-171-1/+12
| | | | | src/xdisp.c (Fline_pixel_height): Don't assume that the current buffer and the selected window's buffer are one and the same.
* Fix bug #17244 with line-move-visual when display string covers a lot of text.Eli Zaretskii2014-04-121-0/+23
| | | | | | | | | src/xdisp.c (move_it_by_lines): If a large portion of buffer text is covered by a display string that ends in a newline, and that cases going back by DVPOS lines to hit the search limit, lift the limit and go back until DVPOS is reached. src/indent.c (Fvertical_motion): Handle correctly the case when the display string is preceded by an empty line.
* Fix bug #17047 with cursor motion when invisible text starts a line.Eli Zaretskii2014-03-231-4/+42
| | | | | | src/xdisp.c (redisplay_window): If all previous attempts to find the cursor row failed, try a few alternatives before falling back to the top-most row of the window. Use row_containing_pos.
* * src/frame.h (SET_FRAME_VISIBLE): Keep frame_garbaged up to date.Stefan Monnier2014-03-201-1/+1
| | | | | * src/xterm.c (handle_one_xevent) <MapNotify>: Don't garbage the frame. * src/frame.c (frame_garbaged): Make "docstring" more precise.
* Update docs for window dividers and `window-text-pixel-size'.Martin Rudalics2014-03-091-6/+10
| | | | | | | | | | | | | | | | | | * xdisp.c (Fwindow_text_pixel_size): Adjust doc-string. * elisp.texi (Top): Rename section "Width" to "Size of Displayed Text". * text.texi (Primitive Indent): * strings.texi (String Basics): * sequences.texi (Sequence Functions): Update references accordingly. * display.texi (Size of Displayed Text): Rename section from "Width". Add description for `window-text-pixel-size'. (Window Dividers): Reword description of window dividers. * frames.texi (Layout Parameters): Improve description of window divider parameters. * windows.texi (Window Sizes): Add descriptions of `window-mode-line-height' and `window-header-line-height'. (Coordinates and Windows): Mention window dividers.
* src/xdisp.c (Fmove_point_visually): Fix previous change.Eli Zaretskii2014-03-081-1/+4
| | | | Fixes: debbugs:16961
* Fix more failures of visual-order cursor movement under word-wrap (bug#16961).Eli Zaretskii2014-03-081-1/+27
| | | | | | | | | | | | | | | src/xdisp.c (move_it_in_display_line_to): If word-wrap is ON, and there's a valid wrap point in the display line, the last glyph cannot "just barely fit" on this row, because display_line doesn't let it. Instead, proceed as if the last glyph didn't fit, so that we eventually back up the iterator to the wrap point. This avoids delusional behavior of move_it_to, whereby it proceeds to the next display line, but sets current_x to zero for all the glyphs that without word-wrap would fit on the previous display line. One result was that visual-order cursor movement behaved erratically under word-wrap. (Fmove_point_visually): Add code to find the x coordinate of the last character before wrap point, under word-wrap on a TTY.
* Fix bug #16961 with visual-order cursor movement and word-wrap.Eli Zaretskii2014-03-071-1/+6
| | | | | | | src/xdisp.c (Fmove_point_visually): When under word-wrap, accept also return value of MOVE_POS_MATCH_OR_ZV from move_it_in_display_line_to, when moving from beginning of line to point's position.
* Don't show drag cursor when modeline can't be dragged (Bug#16647).Martin Rudalics2014-02-281-2/+6
| | | | | * xdisp.c (note_mode_line_or_margin_highlight): Don't show drag cursor when modeline can't be dragged (Bug#16647).
* More fixes for mouse glyph calculations (Bug#16647).Martin Rudalics2014-02-271-16/+52
| | | | | | | | | | | | | | | | | | More fixes for mouse glyph calculations (Bug#16647). * window.c (coordinates_in_window): In intersection of horizontal and vertical window dividers prefer the horizontal one. Add some extra parens to last fix. (window_relative_x_coord): Return x-coordinate for header and mode line too. * xdisp.c (remember_mouse_glyph): In text area don't extend glyph into mode line to show the vertical drag cursor there immediately. Subdivide mouse glyphs in right fringes to show a horizontal drag cursor as soon as we enter the "grabbable width" portion. Handle vertical border case separately. Do not subdivide window divider areas. (note_mouse_highlight): On bottom divider of bottommost windows show vertical drag cursor only when the minibuffer window can be resized.
* Fix bug #16870 with 'box' face in display strings.Eli Zaretskii2014-02-271-11/+52
| | | | | | | | | src/xdisp.c (pop_it): Restore the it->face_box_p flag which could be reset by the face of the object just displayed. See also bug#76. (get_next_display_element): If the string came from a display property, examine the box face attribute at it->position, not at it->current.pos, since the latter was not updated yet. (handle_face_prop): Improve commentary.
* Fixes around Bug#16647.Martin Rudalics2014-02-261-0/+10
| | | | | | | | * xdisp.c (remember_mouse_glyph): Handle ON_RIGHT_DIVIDER and ON_BOTTOM_DIVIDER cases. * window.c (coordinates_in_window): Return ON_VERTICAL_BORDER only if the window has no right divider. (Fcoordinates_in_window_p): Fix doc-string.
* Pacify GCC when configuring with --enable-gcc-warnings.Paul Eggert2014-02-201-1/+1
| | | | | * xdisp.c (move_it_in_display_line_to) [lint]: Initialize recently-added local.
* Fix excessive calls to bidi_shelve_cache reported in bug #15555.Eli Zaretskii2014-02-201-17/+32
| | | | | | | | | src/xdisp.c (move_it_in_display_line_to): Save the iterator state in ppos_it only once per call. Reimplement the method used to return to the best candidate position if all the positions found in display line are beyond TO_CHARPOS. This cuts down the number of calls to bidi_shelve_cache, which moves a lot of stuff when lines are long and include bidirectional text.
* Fix assertion violation in redisplay.Eli Zaretskii2014-02-201-22/+25
| | | | | | src/xdisp.c (try_cursor_movement): Don't use cursor position if set_cursor_from_row failed to compute it. This avoids assertion violations in MATRIX_ROW.
* Fix bug #16819 with dereferencing invalid face pointer.Eli Zaretskii2014-02-201-1/+1
| | | | | src/xdisp.c (init_iterator): Don't dereference a bogus face pointer.
* Fix bug #16806 with horizontal scrolling of images when fringes are disabled.Eli Zaretskii2014-02-191-13/+28
| | | | | | src/xdisp.c (display_line): Fix horizontal scrolling of large images when fringes are turned off. This comes at a price of not displaying the truncation/continuation glyphs in this case.
* * doc/lispref/keymaps.texi (Menu Bar): Minor clarification.Lars Ingebrigtsen2014-02-071-2/+2
| | | | * src/xdisp.c (syms_of_xdisp): Doc clarification (bug#15657).
* Constrain window box sizes (Bug#16649).Martin Rudalics2014-02-071-9/+14
| | | | | | * xdisp.c (window_box_width): Don't return less than zero. (window_box_left_offset, window_box_right_offset): Don't return more than the window's pixel width.
* Fix last fix of note_mouse_highlightMartin Rudalics2014-02-051-0/+2
|
* Spelling fix.Paul Eggert2014-02-051-1/+1
|
* Fix cursor appearance in note_mouse_highlight (Bug#16647).Martin Rudalics2014-02-051-1/+9
| | | | | * xdisp.c (note_mouse_highlight): When entering a margin area show a non-text cursor (Bug#16647).
* Improve window dividers code.Martin Rudalics2014-02-041-1/+2
| | | | | | | | | | | | | | | | | | | * faces.el (window-divider): New default value. Rewrite doc-string. (window-divider-first-pixel, window-divider-last-pixel): New faces. * dispextern.h (face_id): Add WINDOW_DIVIDER_FIRST_PIXEL_FACE_ID and WINDOW_DIVIDER_LAST_PIXEL_FACE_ID. * w32term.c (w32_draw_window_divider): Handle first and last pixels specially. * w32term.h (w32_fill_area_abs): New function. * xdisp.c (x_draw_right_divider): Don't draw over bottom divider. * xfaces.c (realize_basic_faces): Handle new face ids. * xfns.c (Fx_create_frame): Call x_default_parameter for right and bottom divider width. * xterm.c (x_draw_window_divider): Handle first and last pixels specially.
* Fix Fwindow_text_pixel_size and fit-frame-to-buffer.Martin Rudalics2014-01-281-13/+3
| | | | | | | | | | | | | * xdisp.c (last_max_ascent): Re-remove after erroneously reintroducing it on 2013-11-30 and abolishing Dmitry's removal from 2013-03-29. (move_it_to): Re-remove reference to last_max_ascent. (Fwindow_text_pixel_size): Add iterator's max_ascent and max_descent here instead of calling line_bottom_y. Fix doc-string. * window.el (fit-frame-to-buffer): Fix calculations for margins and height constraints.
* * src/eval.c (Fsignal): Fix `debug' handling to match 2013-10-03 change.Stefan Monnier2014-01-241-2/+3
|
* * xdisp.c (reseat_1, Fcurrent_bidi_paragraph_direction): AvoidDmitry Antipov2014-01-241-0/+2
| | | | | | undefined behavior by initializing display property bit of a string processed by the bidirectional iterator. For details, see <http://lists.gnu.org/archive/html/emacs-devel/2014-01/msg01920.html>.
* Fix bug when resizing mini window (Bug#16424).Martin Rudalics2014-01-131-2/+2
| | | | | | * xdisp.c (resize_mini_window): Round height to a multiple of frame's line height. Fix bug in calculation of window start position (Bug#16424).
* Fix bug #16347 with updating redisplay of company-mode's "tooltip".Eli Zaretskii2014-01-111-1/+7
| | | | | | | src/xdisp.c (try_window_id): Don't use this function's optimizations if overlays in the buffer displayed by the window have changed since last redisplay. (message_dolog): Fix indentation.
* src/xdisp.c (try_window_id): Update commentary.Eli Zaretskii2014-01-111-2/+9
|
* Fix handling of internal borders (Bug#16348).Martin Rudalics2014-01-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | * dispnew.c (adjust_frame_glyphs_for_window_redisplay): Remove internal border width from pixel width of windows. (change_frame_size_1): Don't return early when frame's pixel size changes - we still have to record the new sizes in the frame structure. * w32fns.c (x_set_tool_bar_lines): Clear internal border width also when toolbar gets larger. * window.c (check_frame_size): Include internal_border_width in check. * xdisp.c (Ftool_bar_height): Fix doc-string typo. * xfns.c (x_set_menu_bar_lines, x_set_tool_bar_lines): In non-toolkit/non-GTK version clear internal border. * xterm.c (x_clear_under_internal_border): New function for non-toolkit/non-GTK version. (x_after_update_window_line): In non-toolkit/non-GTK version don't do that. (handle_one_xevent, x_set_window_size): Call x_clear_under_internal_border in non-toolkit/non-GTK version. * xterm.h (x_clear_under_internal_border): Extern it.
* Fix bug #16129 with slow and incorrect redisplay in follow-mode.Eli Zaretskii2014-01-061-1/+2
| | | | | src/xdisp.c (redisplay_window): Don't skip window redisplay if the last value of point is not equal to buffer's point.
* Fix bug #16265 with buffer caches when modifying text in indirect buffers.Eli Zaretskii2014-01-011-4/+8
| | | | | | | | | | | | | | | | | src/search.c (newline_cache_on_off, find_newline): In indirect buffers, use the newline cache of the base buffer. src/insdel.c (invalidate_buffer_caches): If BUF is an indirect buffer, invalidate the caches of its base buffer. src/indent.c (width_run_cache_on_off, compute_motion): In indirect buffers, use the width-run cache of the base buffer. src/xdisp.c (redisplay_window): When the window displays an indirect buffer, and the character widths in the display table have changed, invalidate the width-run cache of the corresponding base buffer. src/fileio.c (Finsert_file_contents): When invalidating the newline cache, consider the case of inserting into indirect buffer. src/bidi.c (bidi_paragraph_cache_on_off, bidi_find_paragraph_start): In indirect buffers, use the paragraph cache of the base buffer.
* Update copyright year to 2014 by running admin/update-copyright.Paul Eggert2014-01-011-1/+2
|
* Some more fixes following pixelwise resize changes including one for Bug#16306.Martin Rudalics2013-12-311-4/+2
| | | | | | | | | | | | | | | | | * gtkutil.c (x_wm_set_size_hint): Have size hints respect value of frame_resize_pixelwise. * widget.c (pixel_to_text_size): New function. (update_wm_hints): Have size hints respect value of frame_resize_pixelwise. (EmacsFrameResize): Alway process resize requests pixelwise. * window.c (grow_mini_window): Make sure mini window is at least one line tall. * xdisp.c (display_menu_bar): Make sure menubar extends till right end of frame. * xfns.c (x_set_menu_bar_lines): Resize frame windows pixelwise. (x_set_tool_bar_lines): Calculate pixelwise. * xterm.c (x_wm_set_size_hint): Have size hints respect value of frame_resize_pixelwise.
* Last portion of fix for bug #16051 with redisplay loops.Eli Zaretskii2013-12-231-10/+27
| | | | | | src/xdisp.c (redisplay_tool_bar): Modify the tool-bar-lines frame parameter only when the new size is different from the old one, and the new size can be achieved given the frame height.
* Fix most of bug #16051 with redisplay loops when resizing tool-bar.Eli Zaretskii2013-12-231-13/+26
| | | | | | | | src/xdisp.c (tool_bar_height): Use WINDOW_PIXEL_WIDTH to set up the iterator X limits, not FRAME_TOTAL_COLS, for consistency with what redisplay_tool_bar does. Improve and fix commentary. (hscroll_window_tree): Don't assume w->cursor.vpos is within the limits of the glyph matrices.
* Fix last commit for TTYs.Eli Zaretskii2013-12-191-5/+2
|
* Fix bug #16192 with highlight of display margins when region is activeEli Zaretskii2013-12-191-10/+16
| | | | | src/xdisp.c (extend_face_to_end_of_line): Use default face, not the current text face, for extending the face of the display margins.
* Fix compilation errors introduced by changes in extend_face_to_end_of_line.Eli Zaretskii2013-12-161-1/+4
| | | | | | | src/xdisp.c (extend_face_to_end_of_line): Don't reference tool_bar_window in GTK and NS builds, they don't have this member of struct frame. Fixes: debbugs:16165