mpv-scripts icon indicating copy to clipboard operation
mpv-scripts copied to clipboard

Fix some sequences not printing in titles/filenames

Open lefth opened this issue 3 years ago • 5 comments

This fixes issue #51: for example "temp\home" is shown as "temp ome".

lefth avatar Jul 17 '22 13:07 lefth

I think the better change is:

p = p:gsub("\\", "/")
     :gsub("{", "\\{")
     :gsub("^ ", "\\h")

This will unify the display of path format. And this change also should be applied to the other two scripts: SimpleBookmark.lua, SmartCopyPaste_II.lua.

dyphire avatar Jul 17 '22 16:07 dyphire

Done.

Though I don't like changing the path separator, the code is short this way, and that's ideal because writing lua modules or shared functions for recent versions of mpv is tricky.

lefth avatar Jul 18 '22 17:07 lefth

I believe I have written a function that deals with escape sequences, because there is multiple escape_sequences not dealt with in this PR. I must have forgot to call the existing method on this list.

Eisa01 avatar Oct 21 '22 07:10 Eisa01

I will keep this open for reference until changes are made to fix issue #51

Eisa01 avatar Oct 21 '22 07:10 Eisa01

Only remaining is to migrate the changes of 2044e4397320943f38960d1b99cf4d0c59808a4b to SimpleHistory, and SmartCopyPaste

Eisa01 avatar Nov 18 '22 18:11 Eisa01