mirror of
https://git.sr.ht/~emersion/gamja
synced 2025-03-24 05:49:50 -04:00
Auto-complete channel names
Closes: https://todo.sr.ht/~emersion/gamja/84
This commit is contained in:
parent
aa9ce73d5a
commit
dd67e0789e
1 changed files with 11 additions and 0 deletions
|
@ -1068,6 +1068,17 @@ export default class App extends Component {
|
|||
return repl.map(cmd => "/" + cmd);
|
||||
}
|
||||
|
||||
// TODO: consider using the CHANTYPES ISUPPORT token here
|
||||
if (prefix.startsWith("#")) {
|
||||
let chanNames = [];
|
||||
for (const buf of this.state.buffers.values()) {
|
||||
if (buf.name.startsWith("#")) {
|
||||
chanNames.push(buf.name);
|
||||
}
|
||||
}
|
||||
return fromList(chanNames, prefix);
|
||||
}
|
||||
|
||||
let buf = this.state.buffers.get(this.state.activeBuffer);
|
||||
if (!buf || !buf.members) {
|
||||
return [];
|
||||
|
|
Loading…
Add table
Reference in a new issue