-
Notifications
You must be signed in to change notification settings - Fork 6
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Overview
I had forked and trying add action named toggle_show_linenumber.
But I had got error messsage E21: Cannot make changes, 'modifiable' is off.
Question
I think this is the one of way. It be toggle modifiable at before and after toggle_show_linenumber. Is this better? Or?
vfiler.vim/lua/vfiler/view.lua
Lines 274 to 287 in 9e51bd2
| -- set buffer lines | |
| local saved_view = vim.fn.winsaveview() | |
| core.try({ | |
| function() | |
| buffer:set_option('modifiable', true) | |
| buffer:set_option('readonly', false) | |
| buffer:set_lines(lines) | |
| end, | |
| finally = function() | |
| buffer:set_option('modifiable', false) | |
| buffer:set_option('readonly', true) | |
| vim.fn.winrestview(saved_view) | |
| end, | |
| }) |
Code
Error
Attach toggle_show_linenumber to i key.
And type i then get error message, as a bellow.
E21: Cannot make changes, 'modifiable' is off
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested