Skip to content

Instantly share code, notes, and snippets.

View h-east's full-sized avatar

h_east h-east

  • Osaka, Japan
  • 20:04 (UTC +09:00)
View GitHub Profile
diff --git a/src/edit.c b/src/edit.c
index 7c7fadd10..57a365be4 100644
--- a/src/edit.c
+++ b/src/edit.c
@@ -812,7 +812,7 @@ edit(
{
c = safe_vgetc();
- if (stop_insert_mode)
+ if (stop_insert_mode && !compl_started)
@h-east
h-east / get_doc_info.sh
Last active June 30, 2020 14:06
Bash script for vimdoc-ja-working
#! /bin/bash
#
# ローカルの vimdoc-ja-working/en/*.txt と vim/runtime/doc/*.txt を比較して
# 変更行数情報をMarkdownのtable形式でファイルに出力する。
#
# 2018-05-31 h_east
# 自分の環境にあわせて変更する必要がある
new_doc_dir=~/samba/github/vim/runtime/doc
old_doc_dir=~/samba/github/vimdoc-ja-working/en
diff --git a/src/buffer.c b/src/buffer.c
index b292150a2..a153dd46a 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -290,6 +290,10 @@ open_buffer(
else if (retval == OK && !read_stdin && !read_fifo)
unchanged(curbuf, FALSE);
save_file_ff(curbuf); /* keep this fileformat */
+ curbuf->b_last_changedtick = CHANGEDTICK(curbuf);
+#ifdef FEAT_INS_EXPAND
@h-east
h-east / fix_getwinpos_issue.patch
Last active March 5, 2018 15:23
patch for Vim 8.0.1563 or later. when `:echo getwinpos(1)` displays dust and next key is eaten
diff --git a/src/term.c b/src/term.c
index 7dbbefa49..ca15e4ec2 100644
--- a/src/term.c
+++ b/src/term.c
@@ -143,6 +143,9 @@ static int rbm_status = STATUS_GET;
/* Request cursor style report: */
static int rcs_status = STATUS_GET;
+
+/* Request window position report: */
W_ENDCOL(curwin)
@h-east
h-east / fix_pum.patch
Last active February 17, 2018 16:10
Fix pum
diff --git a/src/popupmnu.c b/src/popupmnu.c
index 2839ea199..709be859f 100644
--- a/src/popupmnu.c
+++ b/src/popupmnu.c
@@ -252,26 +252,28 @@ pum_display(
{
/* align right pum edge with "col" */
#ifdef FEAT_RIGHTLEFT
- if (curwin->w_p_rl)
+ if (curwin->w_p_rl
@h-east
h-east / add_recording_status_to_mode_function.patch
Last active February 18, 2018 11:42
mode(1) includes 'q' when in Recording state.
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 57929d6d7..f817d5128 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -8033,75 +8033,82 @@ f_mkdir(typval_T *argvars, typval_T *rettv)
static void
f_mode(typval_T *argvars, typval_T *rettv)
{
- char_u buf[3];
+ char_u buf[5];
diff --git a/src/normal.c b/src/normal.c
index 745a2f68c..18665771b 100644
--- a/src/normal.c
+++ b/src/normal.c
@@ -1898,9 +1898,12 @@ do_pending_operator(cmdarg_T *cap, int old_col, int gui_yank)
else
{
#ifdef FEAT_LINEBREAK
- curwin->w_p_lbr = lbr_saved;
+ curwin->w_p_lbr = FALSE;
echo setqflist(filter(getqflist({"items":""}).items, 'v:val.text =~ "^set no"'))
diff --git a/runtime/ftplugin/python.vim b/runtime/ftplugin/python.vim
index 5492641..33541e3 100644
--- a/runtime/ftplugin/python.vim
+++ b/runtime/ftplugin/python.vim
@@ -19,7 +19,11 @@ setlocal suffixesadd=.py
setlocal comments=b:#,fb:-
setlocal commentstring=#\ %s
-setlocal omnifunc=pythoncomplete#Complete
+if has('python')