Skip to content

Commit

Permalink
edit (brackated-paste): fix incomplete "CR => LF" conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Feb 6, 2022
1 parent 2f7404e commit 2651c8e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README-ja_JP.md
Expand Up @@ -244,7 +244,7 @@ $ ble-bind -L

コマンドラインに改行が含まれている場合、複数行モード (MULTILINE モード) になります。

<kbd>C-v RET</kbd> または <kbd>C-q RET</kbd> とすると改行をコマンドラインの一部として入力できます。
<kbd>C-v C-j</kbd> または <kbd>C-q C-j</kbd> とすると改行をコマンドラインの一部として入力できます。
複数行モードでは、<kbd>RET</kbd> (<kbd>C-m</kbd>) はコマンドの実行ではなく新しい改行の挿入になります。
複数行モードでは、<kbd>C-j</kbd> を用いてコマンドを実行して下さい。

Expand Down
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -234,7 +234,7 @@ $ ble-bind -L

When the command line string contains a newline character, `ble.sh` enters the MULTILINE mode.

By typing <kbd>C-v RET</kbd> or <kbd>C-q RET</kbd>, you can insert a newline character in the command line string.
By typing <kbd>C-v C-j</kbd> or <kbd>C-q C-j</kbd>, you can insert a newline character in the command line string.
In the MULTILINE mode, <kbd>RET</kbd> (<kbd>C-m</kbd>) causes insertion of a new newline character.
In the MULTILINE mode, the command can be executed by typing <kbd>C-j</kbd>.

Expand Down
6 changes: 3 additions & 3 deletions src/edit.sh
Expand Up @@ -2527,10 +2527,10 @@ function ble/widget/bracketed-paste.hook {
return 148
fi

chars=$chars:
chars=${chars//:13:10:/:10:} # CR LF -> LF
chars=:${chars//:/::}:
chars=${chars//:13::10:/:10:} # CR LF -> LF
chars=${chars//:13:/:10:} # CR -> LF
chars=(${chars//:/' '})
ble/string#split-words chars "${chars//:/ }"

local proc=$_ble_edit_bracketed_paste_proc
_ble_edit_bracketed_paste_proc=
Expand Down

0 comments on commit 2651c8e

Please sign in to comment.