Skip to content

Instantly share code, notes, and snippets.

@saitoha
saitoha / vim-prevent-echo-back.diff
Last active August 29, 2015 14:17
vim: prevent echo-back problem on start up time (https://github.com/saitoha/mouseterm-plus/issues/3)
diff -r 3bd553b9e4bf runtime/doc/eval.txt
--- a/runtime/doc/eval.txt Sat Mar 14 15:35:52 2015 +0100
+++ b/runtime/doc/eval.txt Tue Mar 17 02:26:11 2015 +0900
@@ -6123,11 +6123,8 @@
list items converted to NULs).
Pipes are not used.
- When prepended by |:silent| the shell will not be set to
- cooked mode. This is meant to be used for commands that do
- not need the user to type. It avoids stray characters showing
@saitoha
saitoha / file0.txt
Last active January 26, 2016 13:58
20行でできる、端末版vimの縦分割スクロール高速化設定 ref: http://qiita.com/kefir_/items/c725731d33de4d8fb096
" Use vsplit mode
if has("vim_starting") && !has('gui_running') && has('vertsplit')
function! EnableVsplitMode()
" enable origin mode and left/right margins
let &t_CS = "y"
let &t_ti = &t_ti . "\e[?6;69h"
let &t_te = "\e[?6;69l\e[999H" . &t_te
let &t_CV = "\e[%i%p1%d;%p2%ds"
call writefile([ "\e[?6;69h" ], "/dev/tty", "a")
endfunction
@saitoha
saitoha / mlterm-non-bce.diff
Created February 1, 2015 12:50
vim: support non-bce mlterm (launched with option --term=mlterm).
diff -r 930ad67c0414 src/os_unix.c
--- a/src/os_unix.c Tue Jan 27 14:09:37 2015 +0100
+++ b/src/os_unix.c Sun Feb 01 21:48:34 2015 +0900
@@ -2223,7 +2223,6 @@
/*
* Return TRUE if "name" looks like some xterm name.
- * Seiichi Sato mentioned that "mlterm" works like xterm.
*/
int
@saitoha
saitoha / vim-introduce-xenl.diff
Last active August 29, 2015 14:13
vim: respect xenl/xn capability when writing a character on the last cell of terminal screen
diff -r 930ad67c0414 runtime/doc/term.txt
--- a/runtime/doc/term.txt Tue Jan 27 14:09:37 2015 +0100
+++ b/runtime/doc/term.txt Tue Jan 27 22:16:32 2015 +0900
@@ -224,10 +224,11 @@
the last two characters of the option name. Only one termcap code is
required: Cursor motion, 't_cm'.
-The options 't_da', 't_db', 't_ms', 't_xs' represent flags in the termcap.
-When the termcap flag is present, the option will be set to "y". But any
-non-empty string means that the flag is set. An empty string means that the
@saitoha
saitoha / screen.c.diff
Last active August 29, 2015 14:12 — forked from ttdoda/screen.c.diff
origin mode 無効時でもvsplitが動作するように
--- screen.c.orig 2013-06-15 17:29:09.000000000 +0900
+++ screen.c 2013-06-15 17:45:44.000000000 +0900
@@ -9020,6 +9020,7 @@
int j;
unsigned temp;
int cursor_row;
+ int cursor_col = 0;
int type;
int result_empty;
int can_ce = can_clear(T_CE);
@saitoha
saitoha / graphics.c.patch
Created December 30, 2014 07:37
XTerm #313: Fix default color register for VT-340 (https://github.com/saitoha/libsixel/issues/12)
--- xterm-313/graphics.c 2014-11-29 06:00:04.000000000 +0900
+++ xterm-313/graphics.c 2014-12-30 16:23:31.000000000 +0900
@@ -587,22 +587,22 @@
break;
case 340:
default:
- set_color_register(color_registers, 0, 0, 0, 0);
- set_color_register(color_registers, 1, 20, 20, 80);
- set_color_register(color_registers, 2, 80, 13, 13);
- set_color_register(color_registers, 3, 20, 80, 20);
@saitoha
saitoha / vim-version.txt
Created November 15, 2014 05:22
vim-version.txt
$ vim --version
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 12 2014 23:56:58)
Included patches: 1-507
Compiled by saitoha@mbp2.local
Normal version with GTK2 GUI. Features included (+) or not (-):
+acl -farsi -mouse_netterm +syntax
-arabic +file_in_path -mouse_sgr +tag_binary
+autocmd +find_in_path -mouse_sysmouse +tag_old_static
+balloon_eval +float -mouse_urxvt -tag_any_white
+browse +folding +mouse_xterm -tcl
@saitoha
saitoha / uxpty.c.diff
Created October 12, 2014 16:51
putty: fix for pterm on OSX 10.9
--- putty-0.63/unix/uxpty.c 2013-07-21 16:40:28.000000000 +0900
+++ putty-0.63/unix/uxpty.c 2014-10-13 01:49:46.000000000 +0900
@@ -373,7 +373,9 @@
strncpy(pty->name, ptsname(pty->master_fd), FILENAME_MAX-1);
#endif
+#if !defined(__OSX__)
nonblock(pty->master_fd);
+#endif
@saitoha
saitoha / sixel.c.diff
Created October 7, 2014 13:46
ImageMagick v7: minor fixes
Index: coders/sixel.c
===================================================================
--- coders/sixel.c (revision 16656)
+++ coders/sixel.c (working copy)
@@ -15,7 +15,7 @@
% Software Design %
% Hayaki Saito %
% September 2014 %
-% Based on kmiya@culti's sixel decoder %
+% Based on kmiya's sixel(2014-3-28) %
@saitoha
saitoha / terms.c.diff
Created September 26, 2014 14:15
Fix for w3m-sixel 9b913f4b870d
diff -r 9b913f4b870d terms.c
--- a/terms.c Thu Sep 25 23:21:41 2014 +0900
+++ b/terms.c Fri Sep 26 23:14:47 2014 +0900
@@ -508,7 +508,7 @@
return p;
}
-static void
+static int
save_first_animation_frame(const char *path)