1
0
mirror of synced 2025-11-06 04:30:40 +08:00

fix: Updated documentation for search method

This commit is contained in:
Jamie Peabody
2024-10-11 21:47:52 +01:00
parent 014a482984
commit 9a3277de59

View File

@@ -353,7 +353,7 @@ Scrolls to the next change specified by `direction`.
doc.scrollToDiff('next');
```
### <a name="search"></a>search(side: string, needle: string)
### <a name="search"></a>search(side: string, needle: string, direction: string = 'next')
Search the editor for `needle`, scrolling to the next available match. Repeating the call will find the next available token.
@@ -363,6 +363,7 @@ Search the editor for `needle`, scrolling to the next available match. Repeating
|----|----|-----------|
|side|string|The editor side, either `lhs` or `rhs`.|
|needle|string|The text for which to search.|
|direction|string|The direction to search, either `prev` or `next`.|
#### Example