Skip to content
  • Rob Cornish's avatar
    Document saves with current basename if given a directory · 723f1535
    Rob Cornish authored and Sebastian Ramacher's avatar Sebastian Ramacher committed
    
    
    Currently, if :write is given a directory name as its argument, it fails with the "Failed to save document." error. This can sometimes be quite annoying: for instance, when viewing documents that have been downloaded to /tmp from the web, I often find myself wanting to hang on to file without changing its file name. In order to do so, I either have to leave Zathura and cp the file or else retype the whole filename after :write, neither of which are too convenient.
    
    The following patch would make :write work sort of how mv does: if its argument is a currently existing directory, it will be inferred that the user wants to save the document in that directory using its current basename.
    
    Signed-off-by: default avatarSebastian Ramacher <sebastian@ramacher.at>
    723f1535