Skip to content

Commit

Permalink
rename new impl functions
Browse files Browse the repository at this point in the history
  • Loading branch information
riotrah committed Mar 31, 2024
1 parent a32e2a7 commit df34641
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 5 additions & 1 deletion src/cursor-doc/paredit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ export function selectRange(doc: EditableDocument, ranges: ModelEditRange[]) {
growSelectionStack(doc, ranges);
}

export function selectForm(doc: EditableDocument, topLevel: boolean, selections = doc.selections) {
export function selectCurrentForm(
doc: EditableDocument,
topLevel: boolean,
selections = doc.selections
) {
const newSels = selections.map((sel) => {
const selection = sel;
if (selection.isCursor) {
Expand Down
3 changes: 1 addition & 2 deletions src/paredit/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ export function openList(doc: EditableDocument, isMulti: boolean = false) {
// SELECTION

export function selectCurrentForm(doc: EditableDocument, isMulti: boolean = false) {
paredit.selectForm(doc, false, isMulti ? doc.selections : [doc.selections[0]]);
paredit.selectCurrentForm(doc, false, isMulti ? doc.selections : [doc.selections[0]]);
}

export function rangeForDefun(doc: EditableDocument, isMulti: boolean) {
const selections = isMulti ? doc.selections : [doc.selections[0]];
const ranges = selections.map((s) => paredit.rangeForDefun(doc, s.active));
Expand Down

0 comments on commit df34641

Please sign in to comment.