aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/extmark.c
diff options
context:
space:
mode:
authordundargoc <33953936+dundargoc@users.noreply.github.com>2022-03-24 12:17:21 +0100
committerGitHub <noreply@github.com>2022-03-24 12:17:21 +0100
commit534f5a419d2ef1c2ad78204a4de48388cc2d7fa2 (patch)
tree6f284e02cc872165085d526d7f1d1fc3c56467bb /src/nvim/extmark.c
parentfcd57980f91ca01227b46de1659e6228115e1278 (diff)
downloadrneovim-534f5a419d2ef1c2ad78204a4de48388cc2d7fa2.tar.gz
rneovim-534f5a419d2ef1c2ad78204a4de48388cc2d7fa2.tar.bz2
rneovim-534f5a419d2ef1c2ad78204a4de48388cc2d7fa2.zip
refactor: convert function comments to doxygen format (#17710)
Diffstat (limited to 'src/nvim/extmark.c')
-rw-r--r--src/nvim/extmark.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/nvim/extmark.c b/src/nvim/extmark.c
index 6b879f5139..a3fcc7d784 100644
--- a/src/nvim/extmark.c
+++ b/src/nvim/extmark.c
@@ -175,8 +175,9 @@ static bool extmark_setraw(buf_T *buf, uint64_t mark, int row, colnr_T col)
return true;
}
-// Remove an extmark
-// Returns 0 on missing id
+/// Remove an extmark
+///
+/// @return 0 on missing id
bool extmark_del(buf_T *buf, uint32_t ns_id, uint32_t id)
{
MarkTreeIter itr[1] = { 0 };
@@ -203,8 +204,8 @@ bool extmark_del(buf_T *buf, uint32_t ns_id, uint32_t id)
return true;
}
-// Free extmarks in a ns between lines
-// if ns = 0, it means clear all namespaces
+/// Free extmarks in a ns between lines
+/// if ns = 0, it means clear all namespaces
bool extmark_clear(buf_T *buf, uint32_t ns_id, int l_row, colnr_T l_col, int u_row, colnr_T u_col)
{
if (!map_size(buf->b_extmark_ns)) {
@@ -287,12 +288,13 @@ bool extmark_clear(buf_T *buf, uint32_t ns_id, int l_row, colnr_T l_col, int u_r
return marks_cleared;
}
-// Returns the position of marks between a range,
-// marks found at the start or end index will be included,
-// if upper_lnum or upper_col are negative the buffer
-// will be searched to the start, or end
-// dir can be set to control the order of the array
-// amount = amount of marks to find or -1 for all
+/// @return the position of marks between a range,
+/// marks found at the start or end index will be included.
+///
+/// if upper_lnum or upper_col are negative the buffer
+/// will be searched to the start, or end
+/// dir can be set to control the order of the array
+/// amount = amount of marks to find or -1 for all
ExtmarkInfoArray extmark_get(buf_T *buf, uint32_t ns_id, int l_row, colnr_T l_col, int u_row,
colnr_T u_col, int64_t amount, bool reverse)
{
@@ -334,7 +336,7 @@ next_mark:
return array;
}
-// Lookup an extmark by id
+/// Lookup an extmark by id
ExtmarkInfo extmark_from_id(buf_T *buf, uint32_t ns_id, uint32_t id)
{
ExtmarkInfo ret = { 0, 0, -1, -1, -1, -1, false, false, DECORATION_INIT };
@@ -359,7 +361,7 @@ ExtmarkInfo extmark_from_id(buf_T *buf, uint32_t ns_id, uint32_t id)
}
-// free extmarks from the buffer
+/// free extmarks from the buffer
void extmark_free_all(buf_T *buf)
{
if (!map_size(buf->b_extmark_ns)) {
@@ -389,7 +391,7 @@ void extmark_free_all(buf_T *buf)
}
-// Save info for undo/redo of set marks
+/// Save info for undo/redo of set marks
static void u_extmark_set(buf_T *buf, uint64_t mark, int row, colnr_T col)
{
u_header_T *uhp = u_force_get_undo_header(buf);
@@ -499,7 +501,7 @@ void extmark_apply_undo(ExtmarkUndoObject undo_info, bool undo)
}
-// Adjust extmark row for inserted/deleted rows (columns stay fixed).
+/// Adjust extmark row for inserted/deleted rows (columns stay fixed).
void extmark_adjust(buf_T *buf, linenr_T line1, linenr_T line2, long amount, long amount_after,
ExtmarkOp undo)
{