Skip to content

Commit 63b7694

Browse files
bebarinogitster
authored andcommitted
api-strbuf.txt: fix typos and document launch_editor()
Signed-off-by: Stephen Boyd <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 527b9d7 commit 63b7694

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

Documentation/technical/api-strbuf.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ strbuf API actually relies on the string being free of NULs.
1212

1313
strbufs has some invariants that are very important to keep in mind:
1414

15-
. The `buf` member is never NULL, so you it can be used in any usual C
15+
. The `buf` member is never NULL, so it can be used in any usual C
1616
string operations safely. strbuf's _have_ to be initialized either by
1717
`strbuf_init()` or by `= STRBUF_INIT` before the invariants, though.
1818
+
@@ -55,7 +55,7 @@ Data structures
5555

5656
* `struct strbuf`
5757

58-
This is string buffer structure. The `len` member can be used to
58+
This is the string buffer structure. The `len` member can be used to
5959
determine the current length of the string, and `buf` member provides access to
6060
the string itself.
6161

@@ -253,3 +253,9 @@ same behaviour as well.
253253
comments are considered contents to be removed or not.
254254

255255
`launch_editor`::
256+
257+
Launch the user preferred editor to edit a file and fill the buffer
258+
with the file's contents upon the user completing their editing. The
259+
third argument can be used to set the environment which the editor is
260+
run in. If the buffer is NULL the editor is launched as usual but the
261+
file's contents are not read into the buffer upon completion.

0 commit comments

Comments
 (0)