Hi,

I have created a transactional library, and I am trying to make the vim :write 
command transactional. The idea here is that, instead of writing to the .swp 
file, vim directly applies updates to the relevant file. (I'm only guessing 
that this is how vim works when the noswpfile setting is enabled. Please 
correct me if I'm wrong.)

I've wrapped the do_write(eap) command in ex_write() (in src/ex_cmds.c) in a 
transaction. From my logs, it seems like some random file with a filename of 4 
random digits (4913 in my case) was created. And then the original file was 
renamed to itself with a "~" at the end. And then a file is created with the 
original file's name, and then that's removed.

In any case, it seems like the logs I record for filesystem operations do not 
reflect the final state of my folder. My question is, are there other commands 
executed outsides of do_write() when I enter :write into vim?

As a side note, my transactional library only covers basic glibc calls, like 
write(), open(), rename(), remove(), etc. If vim uses some other mechanism to 
persist data to storage, than it's possible those calls are bypassing my 
library.

Could someone give me a summary of how vim persists data when noswpfile is set?

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui