-
-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error when trying to change todo status #42
Comments
Hey, thanks for the suggestion I will use abort more. This error seems to indicate that |
I did a quick test, and discovered that if I use the mapping on a headline
(i.e. one with one or more stars at the beginning) it works, but if I use it
on any other line it fails with the above error. So if todo markers are not
supported on those lines it should probably either ignore them or give a
meaningful warning.
By the way, during the testing I came across another issue: If I change a
headline without saving the file, and then use the todo status mapping, it
works on the saved file and so discards the unsaved changes. This could
probably be handled by getting the line content with the 'getline()' function
instead of whatever it is doing at the moment.
|
Hi, Thanks for looking into this, I believe that is by design, I will try to make sure that when you use this functionality it doesn't give errors when using on non-headline lines. As far as working with unsaved files go I will have another look, by design since we do a lot of manipulations to files, it is designed to work with unsaved files and tries to read files from buffer, as opposed to reading from the file system so it should in theory work, but there is also a caching layer in play and if files are changed outside of vim there may be gaps and the caches may become invalidated without the plugins knowledge. |
Search for the current heading for `gI`, `gO` and `cit`. dhruvasagar/vim-dotoo#42
Hey there,
EDIT: I also tried switching CityX with the [datetime] block but that didnt help. However, removing the time and retaining the date did help. EDIT2: And yes, at some point I also notice that by applying |
In Vim 8.0.49, if I try to use the
cit
binding to change the TODO status of a line, I get this error after pressing a key to select the status to change to:Unrelated, looking at the source of that function made me notice that it would be good to add the
abort
modifier to all of the functions so that they stop executing after the first error (see:h :func-abort
).The text was updated successfully, but these errors were encountered: