erming / erming/tabcomplete

Case of entered text is not updated if "select" is used as hint

Open
#21 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
HTML
Stars
74
Forks
13
PR merge metrics
No merged PRs in 30d

Description

If the option `hint` is set to `"select"` then the case of the entered characters remains the same regardless of the case of the word it is being matched to.

My suggestion for a fix is to change this in [line 144](https://github.com/erming/tabcomplete/blob/gh-pages/src/tabcomplete.js#L144):

```
var text = options.hint == "select" ? value : [...]
```

To this:

```
var text = options.hint == "select" ? value.slice(0, -word.length) + word : [...]
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.