Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4b320ad

Browse filesBrowse files
khalsahevanlucas
authored andcommitted
doc: correct sample output of buf.compare
Comparing the buffers `ABC` and `ABCD` returns `-1` not `1`. PR-URL: #7777 Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net>
1 parent f97aa4b commit 4b320ad
Copy full SHA for 4b320ad

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Open diff view settings
Collapse file

‎doc/api/buffer.md‎

Copy file name to clipboardExpand all lines: doc/api/buffer.md
+1-1Lines changed: 1 addition & 1 deletion
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -806,7 +806,7 @@ console.log(buf1.compare(buf1));
806806
console.log(buf1.compare(buf2));
807807
// Prints: -1
808808
console.log(buf1.compare(buf3));
809-
// Prints: 1
809+
// Prints: -1
810810
console.log(buf2.compare(buf1));
811811
// Prints: 1
812812
console.log(buf2.compare(buf3));

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.