File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -242,6 +242,33 @@ Describe git-messenger.vim
242
242
Assert True (found, ' Got line: ' . string (getline (2 )))
243
243
End
244
244
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
+ Assert Equal (getreg (v: register ), ' foo' )
254
+
255
+ normal c
256
+
257
+ let lines = getline (1 , ' $' )
258
+ let commit = lines [2 ]
259
+ let hash = matchstr (commit, ' ^ Commit: \+\zs[[:xdigit:]]\{7,}$' )
260
+ Assert Equal (getreg (v: register ), hash)
261
+
262
+ " Confirm also works after moving to a different commit
263
+ normal o
264
+ normal c
265
+
266
+ let lines = getline (1 , ' $' )
267
+ let commit = lines [2 ]
268
+ let hash = matchstr (commit, ' ^ Commit: \+\zs[[:xdigit:]]\{7,}$' )
269
+ Assert Equal (getreg (v: register ), hash)
270
+ End
271
+
245
272
It does not cause #23 again
246
273
" 1. Open the same buffer with multiple window
247
274
" 2. Move cursror to the second window which opens the same
You can’t perform that action at this time.
0 commit comments