Skip to content

Commit

Permalink
vi (nth-column), util (ble-autoload): fix syntactic bugs found by "os…
Browse files Browse the repository at this point in the history
…h -n"
  • Loading branch information
akinomyoga committed Mar 9, 2020
1 parent 420c933 commit da6cc47
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion keymap/vi.sh
Expand Up @@ -3812,7 +3812,7 @@ function ble/widget/vi-command/nth-column {
else
[[ $_ble_decode_keymap != vi_[xs]map ]] &&
ble-edit/content/nonbol-eolp "$eol" && ((eol--))
((index=bol+ARG-1,index>eol?(index=eol)))
((index=bol+ARG-1,index>eol&&(index=eol)))
fi

ble/widget/vi-command/exclusive-goto.impl "$index" "$FLAG" "$REG" nobell
Expand Down
3 changes: 2 additions & 1 deletion memo/ChangeLog.md
Expand Up @@ -14,7 +14,7 @@
- complete: add `compopt -o quote/default` for `fzf` (motivated by dylankb) `#D1275` 58e1be4
- util (`ble-import`): support an option `-d` (`--delay`) `#D1285` 9673e4e
- syntax: support parameter expansion of the form `${var/#pat}`, `${var/%pat}` `#D1286` e2f4809

## Fix

- util (ble/builtin/trap): fix argument analysis for the form `trap INT` (reported by dylankb) `#D1221` db8b0c2
Expand All @@ -36,6 +36,7 @@
- edit: work around Bash rebinding on `TERM` change `#D1287` ac7ab55 7a99bf3
- term: work around terminfo/termcap entry collisions in `tput` (reported by killermoehre) `#D1289` f8c54ef
- complete: clear menu on discard-line (reported by animecyc) `#D1290` fb794b3
- vi (vi-command/nth-column): fix a bug in arithmetic expansion (reported by andychu) `#D1292`

## Changes

Expand Down
10 changes: 10 additions & 0 deletions note.txt
Expand Up @@ -2667,6 +2667,16 @@ bash_tips
Done (実装ログ)
-------------------------------------------------------------------------------

2020-03-08

* vi: vi-commandn/nth-column の算術式がおかしい (reported by andychu) [#D1292]
https://github.com/oilshell/oil/issues/620#issuecomment-596189684

osh -n で見つかったバグである。後で全体的に確認する必要があるという気がする。
多分、osh -n は一番最初に見つかった物しか報告していない。
→やはりそうだった。もう一つバグを見つけた。
然し殆どは ((${prefix}xx=...)) の形式だった。

2020-02-27

* 2020-02-06 quoted-insert で制御文字を入力できる様にする [#D1291]
Expand Down
2 changes: 1 addition & 1 deletion src/util.sh
Expand Up @@ -2423,7 +2423,7 @@ function ble/util/autoload/.read-arguments {
flags=e$flags
fi

file=${args[0]} functions=("${#args[@]:1}")
file=${args[0]} functions=("${args[@]:1}")
}
function ble-autoload {
local file flags
Expand Down

0 comments on commit da6cc47

Please sign in to comment.