Skip to content

Commit ff8e57a

Browse files
hezhizhensindrets
andauthored
chore: Fix typos (#341)
Co-authored-by: Sindre T. Strøm <[email protected]>
1 parent 036e9ae commit ff8e57a

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

doc/diffview.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,7 @@ hooks *diffview-config-hooks*
706706
The buffer number of the new buffer.
707707
{ctx} (`table`)
708708
{symbol} (string)
709-
A symbol that indentifies the window's position in
709+
A symbol that identifies the window's position in
710710
the layout. These symbols correspond with the
711711
figures under |diffview-config-view.x.layout|.
712712
• {layout_name} (string)
@@ -728,7 +728,7 @@ hooks *diffview-config-hooks*
728728
displayed.
729729
{ctx} (`table`)
730730
{symbol} (string)
731-
A symbol that indentifies the window's position in
731+
A symbol that identifies the window's position in
732732
the layout. These symbols correspond with the
733733
figures under |diffview-config-view.x.layout|.
734734
• {layout_name} (string)
@@ -1184,7 +1184,7 @@ view_windo({cmd}) *diffview-actions-view_windo*
11841184
{layout_name} (string)
11851185
The name of the current layout.
11861186
{symbol} (string)
1187-
A symbol that indentifies the window's position in the
1187+
A symbol that identifies the window's position in the
11881188
layout. These symbols correspond with the figures
11891189
under |diffview-config-view.x.layout|.
11901190

lua/diffview/arg_parser.lua

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ function ArgObject:get_flag(names, opt)
7070
return v
7171
end)
7272

73-
-- If a list isn't expcted: return the last defined value for this flag.
73+
-- If a list isn't expected: return the last defined value for this flag.
7474
return opt.expect_list and values or values[#values]
7575
end
7676

@@ -96,7 +96,7 @@ function FlagValueMap:put(flag_synonyms, producer)
9696
end
9797
end
9898
self.map[flag] = producer or { "true", "false" }
99-
self.map[#self.map+1] = flag
99+
self.map[#self.map + 1] = flag
100100
end
101101
end
102102

@@ -155,7 +155,7 @@ function FlagValueMap:get_completion(arg_lead)
155155
for _, v in ipairs(values) do
156156
local e_lead, _ = vim.pesc(arg_lead)
157157
if v:match(e_lead) then
158-
items[#items+1] = name_lead .. v
158+
items[#items + 1] = name_lead .. v
159159
end
160160
end
161161

@@ -217,17 +217,17 @@ end
217217
function M.split_ex_range(arg)
218218
local idx = arg:match(".*()%A")
219219
if not idx then
220-
return "", arg
220+
return "", arg
221221
end
222222

223223
local slice = arg:sub(idx or 1)
224224
idx = slice:match("[^']()%a")
225225

226226
if idx then
227-
return arg:sub(1, (#arg - #slice) + idx - 1), slice:sub(idx)
227+
return arg:sub(1, (#arg - #slice) + idx - 1), slice:sub(idx)
228228
end
229229

230-
return arg, ""
230+
return arg, ""
231231
end
232232

233233
---@class CmdLineContext

lua/diffview/renderer.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ function M.create_cursor_constraint(components)
389389
---constraint, the next component is determined by the direction the cursor is
390390
---moving.
391391
---@param winid_or_opt number|{from: number, to: number}
392-
---@param delta number The amount of change from the current cursor positon.
392+
---@param delta number The amount of change from the current cursor position.
393393
---Not needed if the first argument is a table.
394394
---@return number
395395
return function(winid_or_opt, delta)

lua/diffview/scene/views/diff/listeners.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ return function(view)
105105
end,
106106
open_commit_log = function()
107107
if view.left.type == RevType.STAGE and view.right.type == RevType.LOCAL then
108-
utils.info("Changes not commited yet. No log available for these changes.")
108+
utils.info("Changes not committed yet. No log available for these changes.")
109109
return
110110
end
111111

@@ -124,9 +124,9 @@ return function(view)
124124
if item then
125125
local success
126126
if item.kind == "working" or item.kind == "conflicting" then
127-
success = view.adapter:add_files({item.path})
127+
success = view.adapter:add_files({ item.path })
128128
elseif item.kind == "staged" then
129-
success = view.adapter:reset_files({item.path})
129+
success = view.adapter:reset_files({ item.path })
130130
end
131131

132132
if not success then
@@ -149,7 +149,7 @@ return function(view)
149149

150150
---@type Node
151151
local item_node
152-
tree.root:deep_some(function (node, _, _)
152+
tree.root:deep_some(function(node, _, _)
153153
if node == item._node then
154154
item_node = node
155155
return true

0 commit comments

Comments
 (0)