-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
set history=100000000と設定するとコマンドラインモードに移行する度にE342
が表示されVimを終了出来ない
#579
Comments
だが |
historyに設定できる値に上限を設けたほうが手っ取り早くないですか? |
もしかしたら32bit版使うと即死? |
こんな設定している人ほとんど見ないですが,どういう需要があるんでしょうか… |
おそらく、「ほぼ無限に全ての履歴を保存したい」んでしょう。zshではそういう設定をしている人を見たことがあります。 |
上限を設けてもアカンときはアカンのとちゃいます?反対はしません。 これ落ちた人います? |
これで diff -r 4aa63564dd3f src/ex_getln.c
--- a/src/ex_getln.c Wed Jun 18 21:38:18 2014 +0200
+++ b/src/ex_getln.c Sat Jun 21 00:36:12 2014 +0900
@@ -334,6 +334,9 @@
#ifdef FEAT_CMDHIST
init_history();
+ if (firstc == ':')
+ did_emsg = 0; /* When error occured in init_history(),
+ But We can execute ':q'. */
hiscnt = hislen; /* set hiscnt to impossible history value */
histype = hist_char2type(firstc);
#endif |
'history'オプションに上限を設けるpatch (10000が最大) diff -r 4aa63564dd3f runtime/doc/options.txt
--- a/runtime/doc/options.txt Wed Jun 18 21:38:18 2014 +0200
+++ b/runtime/doc/options.txt Tue Jun 24 23:09:29 2014 +0900
@@ -3926,6 +3926,7 @@
A history of ":" commands, and a history of previous search patterns
are remembered. This option decides how many entries may be stored in
each of these histories (see |cmdline-editing|).
+ The maximum value is 10000.
NOTE: This option is set to the Vi default value when 'compatible' is
set and to the Vim default value when 'compatible' is reset.
diff -r 4aa63564dd3f src/option.c
--- a/src/option.c Wed Jun 18 21:38:18 2014 +0200
+++ b/src/option.c Tue Jun 24 23:09:29 2014 +0900
@@ -8595,6 +8595,11 @@
errmsg = e_positive;
p_hi = 0;
}
+ else if (p_hi > 10000)
+ {
+ errmsg = e_invarg;
+ p_hi = 10000;
+ }
if (p_re < 0 || p_re > 2)
{
errmsg = e_invarg; |
patch 2つvim_devに投げた。 |
🐶 👍 |
'history'オプションに上限が設けられて最大10000になったぜ!Yeah:cat2: |
デフォルト値も 20 から 50 に変更になりました。 |
回答を読み違えていたw |
Bram「お前の英語、狂っちゃいないぜ」 |
続報 「なんで 10000 なんだ。俺は 65536 を設定してる。」という意見も。 |
くっそw |
「まさか!? 「そのまさかじゃなかった!フハハハハハ!」
|
https://twitter.com/p_ck_/status/478875647628951552
E342: メモリが足りません! (1600000000 バイトを割当要求)
Fedora19で試したところ死にはしませんでしたが
:
押下直後にE342
が表示されてその後に入力したコマンドがexコマンドとして認識されていないようでした。Windows 7でもちょっと待たされますが現象は同じでした。
init_history()
でlalloc()
がNULLを返してE342
を出力した後のどこかでマズっている感じ。暫定対策:
ZQ
またはZZ
でVimを終了させる。The text was updated successfully, but these errors were encountered: