diff src/gui_x11.c @ 12317:2a8890b80923 v8.0.1038

patch 8.0.1038: strike-through text not supported commit https://github.com/vim/vim/commit/cf4b00c856ef714482d8d060332ac9a4d74e6b88 Author: Bram Moolenaar <Bram@vim.org> Date: Sat Sep 2 18:33:56 2017 +0200 patch 8.0.1038: strike-through text not supported Problem: Strike-through text not supported. Solution: Add support for the "strikethrough" attribute. (Christian Brabandt, Ken Takata)
author Christian Brabandt <cb@256bit.org>
date Sat, 02 Sep 2017 18:45:04 +0200
parents 519e4e6bbc28
children 1a450ce6980c
line wrap: on
line diff
--- a/src/gui_x11.c
+++ b/src/gui_x11.c
@@ -2542,6 +2542,16 @@ gui_mch_draw_string(
 		y, FILL_X(col + cells) - 1, y);
     }
 
+    if (flags & DRAW_STRIKE)
+    {
+	int	y = FILL_Y(row + 1) - gui.char_height/2;
+
+	XSetForeground(gui.dpy, gui.text_gc, prev_sp_color);
+	XDrawLine(gui.dpy, gui.wid, gui.text_gc, FILL_X(col),
+		y, FILL_X(col + cells) - 1, y);
+	XSetForeground(gui.dpy, gui.text_gc, prev_fg_color);
+    }
+
 #ifdef FEAT_XFONTSET
     if (current_fontset != NULL)
 	XSetClipMask(gui.dpy, gui.text_gc, None);