Allow tab completing users in brackets (#28460)
* Allow tab completing users in brackets Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> * Account for range offsets when tab completing to not replace unrelated characters Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --------- Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
parent
d36cfc37e2
commit
ae3ca52bd2
3 changed files with 17 additions and 5 deletions
|
@ -10,11 +10,12 @@ import { KeyboardEvent } from "react";
|
|||
|
||||
import { Part, CommandPartCreator, PartCreator } from "./parts";
|
||||
import DocumentPosition from "./position";
|
||||
import { ICompletion } from "../autocomplete/Autocompleter";
|
||||
import { ICompletion, ISelectionRange } from "../autocomplete/Autocompleter";
|
||||
import Autocomplete from "../components/views/rooms/Autocomplete";
|
||||
|
||||
export interface ICallback {
|
||||
replaceParts?: Part[];
|
||||
range?: ISelectionRange;
|
||||
close?: boolean;
|
||||
}
|
||||
|
||||
|
@ -82,6 +83,7 @@ export default class AutocompleteWrapperModel {
|
|||
this.updateCallback({
|
||||
replaceParts: this.partForCompletion(completion),
|
||||
close: true,
|
||||
range: completion.range,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue