File tree Expand file tree Collapse file tree 2 files changed +22
-4
lines changed
Expand file tree Collapse file tree 2 files changed +22
-4
lines changed Original file line number Diff line number Diff line change @@ -127,12 +127,12 @@ function M.indentexpr(linenr)
127127 return last_indent + shiftwidth
128128 end
129129
130- if INDENT_AFTER : match_str (last ) then
131- return last_indent + shiftwidth
130+ if focuses_at (last , last_indent + 1 ) then
131+ last_indent = last_indent + # ' · '
132132 end
133133
134- if focuses_at (last , last_indent + 1 ) then
135- return last_indent + # ' · '
134+ if INDENT_AFTER : match_str (last ) then
135+ return last_indent + shiftwidth
136136 end
137137
138138 if not is_declaration_args (linenr - 2 ) then
Original file line number Diff line number Diff line change @@ -254,6 +254,24 @@ describe('indent', function()
254254 )
255255 )
256256
257+ it (
258+ ' indents again after by at focused stuff' ,
259+ helpers .clean_buffer (
260+ [[
261+ theorem foo : 37 = 37 := by
262+ · have : 37 = 37 := by
263+ ]] ,
264+ function ()
265+ helpers .feed ' Gosorry'
266+ assert .contents .are [[
267+ theorem foo : 37 = 37 := by
268+ · have : 37 = 37 := by
269+ sorry
270+ ]]
271+ end
272+ )
273+ )
274+
257275 for each in fixtures .indent () do
258276 it (each .description , function ()
259277 vim .cmd .edit { each .unindented , bang = true }
You can’t perform that action at this time.
0 commit comments