File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,32 @@ Describe git-messenger.vim
242242 Assert True (found, ' Got line: ' . string (getline (2 )))
243243 End
244244
245+ It yanks current commit on c
246+ GitMessenger
247+ Assert IsNotNone (GetPopup ())
248+
249+ GitMessenger
250+ Assert Exists (' b:__gitmessenger_popup' )
251+
252+ call setreg (v: register , ' foo' )
253+
254+ normal c
255+
256+ let lines = getline (1 , ' $' )
257+ let commit = lines [2 ]
258+ let hash = matchstr (commit, ' ^ Commit: \+\zs[[:xdigit:]]\{7,}$' )
259+ Assert Equal (getreg (v: register ), hash)
260+
261+ " Confirm also works after moving to a different commit
262+ normal o
263+ normal c
264+
265+ let lines = getline (1 , ' $' )
266+ let commit = lines [2 ]
267+ let hash = matchstr (commit, ' ^ Commit: \+\zs[[:xdigit:]]\{7,}$' )
268+ Assert Equal (getreg (v: register ), hash)
269+ End
270+
245271 It does not cause #23 again
246272 " 1. Open the same buffer with multiple window
247273 " 2. Move cursror to the second window which opens the same
You can’t perform that action at this time.
0 commit comments