Skip to content

Instantly share code, notes, and snippets.

 normal 
 bold 
 faint 
 italic 
 underline 
 blink 
 rapid blink 
 reverse 
 concealed 
 crossed-out 
$ make
gcc -o mkfont_bdf tools/mkfont_bdf.c -std=c99 -pedantic -Wall -s -pipe
./mkfont_bdf table/alias fonts/milkjf_k16.bdf fonts/milkjf_8x16.bdf fonts/milkjf_8x16r.bdf > glyph.h
read bdf: fonts/milkjf_k16.bdf
"JISX0208.1990"
read bdf: fonts/milkjf_8x16.bdf
"ISO8859"
read bdf: fonts/milkjf_8x16r.bdf
"JISX0201.1976"
swapped: use U+301C for U+FF5E
@saitoha
saitoha / vim-decefr.diff
Last active August 29, 2015 14:03
vim: Use filter rectangle when ttymouse=dec (DEC locator events) is set
diff -r dd88acaa1a57 src/os_unix.c
--- a/src/os_unix.c Thu Jun 26 22:33:51 2014 +0200
+++ b/src/os_unix.c Wed Jul 02 00:56:24 2014 +0900
@@ -5128,7 +5128,7 @@
if (WantQueryMouse)
{
WantQueryMouse = FALSE;
- mch_write((char_u *)IF_EB("\033[1'|", ESC_STR "[1'|"), 5);
+ mch_write((char_u *)IF_EB("\033['w", ESC_STR "['w"), 4);
}
@saitoha
saitoha / correct-termresponse-behavior-with-decmouse.diff
Last active August 29, 2015 14:03
vim: correct termresponse behavior when "set ttymouse=" or "set ttymouse=dec"
diff -r 0efec12f52ac src/os_unix.c
--- a/src/os_unix.c Thu Jul 10 22:01:47 2014 +0200
+++ b/src/os_unix.c Sat Jul 12 21:41:54 2014 +0900
@@ -3667,8 +3667,6 @@
void
check_mouse_termcode()
{
- xterm_conflict_mouse = FALSE;
-
# ifdef FEAT_MOUSE_XTERM
@saitoha
saitoha / enable-pterm.diff
Last active August 29, 2015 14:03
vim: enable pterm mouse in non-qnx environment
diff -r d8d7de0a150b src/feature.h
--- a/src/feature.h Wed Jul 09 17:51:51 2014 +0200
+++ b/src/feature.h Thu Jul 10 02:16:05 2014 +0900
@@ -1076,7 +1076,7 @@
# if defined(FEAT_NORMAL) && (defined(MSDOS) || defined(WIN3264))
# define DOS_MOUSE
# endif
-# if defined(FEAT_NORMAL) && defined(__QNX__)
+# if defined(FEAT_NORMAL)
# define FEAT_MOUSE_PTERM
@saitoha
saitoha / terminal.h.diff
Created July 28, 2014 05:26
recterm: fix odd behavior with 'print "\033[1;80HA\033[2;80HB";cat'
diff --git a/terminal.h b/terminal.h
index 9a08666..704d34c 100644
--- a/terminal.h
+++ b/terminal.h
@@ -172,6 +172,7 @@ void set_cursor(struct terminal *term, int y, int x)
term->cursor.x = x;
term->cursor.y = y;
+ term->wrap_occured = false;
}
@saitoha
saitoha / conf.h.diff
Created July 28, 2014 05:34
recterm: build fix for OSX
diff --git a/conf.h b/conf.h
index d598ffb..21e3160 100644
--- a/conf.h
+++ b/conf.h
@@ -49,7 +49,7 @@ const char *term_name = "yaft-256color";
//const char *fb_path = "/dev/graphics/fb0"; /* for Android */
/* shell */
-#if defined(__linux__)
+#if defined(__linux__) || defined(__MACH__)
@saitoha
saitoha / xterm-prevent-sixel-filcker.diff
Created August 14, 2014 16:26
xterm: fix for filcker problem with animated SIXEL graphics (http://youtu.be/_kUzRHVllJg)
--- xterm-310/graphics.c 2014-07-13 10:19:45.000000000 +0900
+++ xterm-310/graphics.c 2014-08-15 01:20:53.000000000 +0900
@@ -847,6 +847,7 @@
XGCValues xgcv;
XtGCMask mask;
int holes, total;
+ Pixmap pixmap;
TRACE(("refreshing graphic from %d,%d %dx%d (valid=%d, size=%dx%d, scale=%dx%d max=%dx%d) at base=%d,%d\n",
x, y, w, h,
@saitoha
saitoha / xserver-xsdl-for-sdl-sixel.diff
Last active August 29, 2015 14:06
Rebase xserver-xsdl to current xserver master HEAD(3a51418b)
diff --git a/build-xsdl.sh b/build-xsdl.sh
new file mode 100755
index 0000000..61c2077
--- /dev/null
+++ b/build-xsdl.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+x11prefix=/opt/X11
+
@saitoha
saitoha / mlterm-buildfix-for-r2371.diff
Created September 13, 2014 12:32
mlterm: fix build for r2371
diff -r a3b03f8183dc mlterm/ml_term_manager.c
--- a/mlterm/ml_term_manager.c Sat Sep 13 08:22:25 2014 +0900
+++ b/mlterm/ml_term_manager.c Sat Sep 13 21:30:17 2014 +0900
@@ -338,7 +338,7 @@
alt_color_mode)))
{
ml_term_plug_pty( terms[num_of_terms++] , pty) ;
- ml_set_pty_winsize( pty , cols , rows) ;
+ ml_set_pty_winsize( pty , cols , rows, 0, 0) ;