changeset 206:87857ffdbf46

updated for version 7.0060
author vimboss
date Tue, 15 Mar 2005 22:46:30 +0000
parents d292c40ca788
children 4968de555941
files runtime/doc/version7.txt src/gui_x11.c
diffstat 2 files changed, 64 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/doc/version7.txt
+++ b/runtime/doc/version7.txt
@@ -1,4 +1,4 @@
-*version7.txt*  For Vim version 7.0aa.  Last change: 2005 Mar 11
+*version7.txt*  For Vim version 7.0aa.  Last change: 2005 Mar 15
 
 
 		  VIM REFERENCE MANUAL    by Bram Moolenaar
@@ -332,6 +332,7 @@ New functions: ~
 |split()|		split a String into a List
 |string()|		String representation of a List or Dictionary
 |system()|		Filters {input} through a shell command.
+|taglist()|		Get list of matching tags. (Yegappan Lakshmanan)
 |tr()|			Translate characters. (Ron Aaron)
 |values()|		get List of Dictionary values
 |writefile()|		write a list of lines into a file
@@ -959,4 +960,14 @@ When setting 'ttymouse' to "dec" in an x
 locator it doesn't work.  Now switch off the mouse before selecting another
 mouse model.
 
+When the CursorHold event is triggered and the commands peek for typed
+characters the typeahead buffer may be messed up, e.g., when a mouse-up event
+is received.  Avoid invoking the autocommands from the function waiting for a
+character, let it put K_CURSORHOLD in the input buffer.
+
+Removed the "COUNT" flag from ":argadd", to avoid ":argadd 1*" to be used like
+":1argadd *".
+
+Avoid that $LANG is used for the menus when LC_MESSAGES is "en_US".
+
  vim:tw=78:ts=8:ft=help:norl:
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -121,6 +121,7 @@ static int fontset_ascent __ARGS((XFontS
 
 static guicolor_T	prev_fg_color = INVALCOLOR;
 static guicolor_T	prev_bg_color = INVALCOLOR;
+static guicolor_T	prev_sp_color = INVALCOLOR;
 
 #if defined(FEAT_GUI_MOTIF) && defined(FEAT_MENU)
 static XButtonPressedEvent last_mouse_event;
@@ -145,6 +146,7 @@ static void gui_x11_send_event_handler _
 static void gui_x11_wm_protocol_handler __ARGS((Widget, XtPointer, XEvent *, Boolean *));
 static void gui_x11_blink_cb __ARGS((XtPointer timed_out, XtIntervalId *interval_id));
 static Cursor gui_x11_create_blank_mouse __ARGS((void));
+static void draw_curl __ARGS((int row, int col, int cells));
 
 
 /*
@@ -2431,6 +2433,9 @@ find_closest_color(colormap, colorPtr)
     return OK;
 }
 
+/*
+ * Set the current text foreground color.
+ */
     void
 gui_mch_set_fg_color(color)
     guicolor_T	color;
@@ -2457,6 +2462,16 @@ gui_mch_set_bg_color(color)
 }
 
 /*
+ * Set the current text special color.
+ */
+    void
+gui_mch_set_sp_color(color)
+    guicolor_T	color;
+{
+    prev_sp_color = color;
+}
+
+/*
  * create a mouse pointer that is blank
  */
     static Cursor
@@ -2470,6 +2485,29 @@ gui_x11_create_blank_mouse()
 	    (XColor*)&gui.norm_pixel, (XColor*)&gui.norm_pixel, 0, 0);
 }
 
+/*
+ * Draw a curled line at the bottom of the character cell.
+ */
+    static void
+draw_curl(row, col, cells)
+    int row;
+    int col;
+    int cells;
+{
+    int			i;
+    int			offset;
+    const static int	val[8] = {1, 0, 0, 0, 1, 2, 2, 2 };
+
+    XSetForeground(gui.dpy, gui.text_gc, prev_sp_color);
+    for (i = FILL_X(col); i < FILL_X(col + cells); ++i)
+    {
+	offset = val[i % 8];
+	XDrawPoint(gui.dpy, gui.wid, gui.text_gc, i,
+						FILL_Y(row + 1) - 1 - offset);
+    }
+    XSetForeground(gui.dpy, gui.text_gc, prev_fg_color);
+}
+
     void
 gui_mch_draw_string(row, col, s, len, flags)
     int		row;
@@ -2561,6 +2599,7 @@ gui_mch_draw_string(row, col, s, len, fl
 	XFillRectangle(gui.dpy, gui.wid, gui.text_gc, FILL_X(col),
 		FILL_Y(row), gui.char_width * cells, gui.char_height);
 	XSetForeground(gui.dpy, gui.text_gc, prev_fg_color);
+
 #ifdef FEAT_MBYTE
 	if (enc_utf8)
 	    XDrawString16(gui.dpy, gui.wid, gui.text_gc, TEXT_X(col),
@@ -2596,10 +2635,22 @@ gui_mch_draw_string(row, col, s, len, fl
 		    TEXT_Y(row), (char *)s, len);
     }
 
+    /* Undercurl: draw curl at the bottom of the character cell. */
+    if (flags & DRAW_UNDERC)
+	draw_curl(row, col, cells);
+
     /* Underline: draw a line at the bottom of the character cell. */
     if (flags & DRAW_UNDERL)
+    {
+	int	y = FILL_Y(row + 1) - 1;
+
+	/* When p_linespace is 0, overwrite the bottom row of pixels.
+	 * Otherwise put the line just below the character. */
+	if (p_linespace > 1)
+	    y -= p_linespace - 1;
 	XDrawLine(gui.dpy, gui.wid, gui.text_gc, FILL_X(col),
-	     FILL_Y(row + 1) - 1, FILL_X(col + cells) - 1, FILL_Y(row + 1) - 1);
+		y, FILL_X(col + cells) - 1, y);
+    }
 
 #ifdef FEAT_XFONTSET
     if (current_fontset != NULL)