File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -554,7 +554,7 @@ do_map(
554554 for ( ; mp != NULL && !got_int ; mp = mp -> m_next )
555555 {
556556 // check entries with the same mode
557- if ((mp -> m_mode & mode ) != 0 )
557+ if (! mp -> m_simplified && (mp -> m_mode & mode ) != 0 )
558558 {
559559 if (!haskey ) // show all entries
560560 {
@@ -599,15 +599,19 @@ do_map(
599599 for (mp = * mpp ; mp != NULL && !got_int ; mp = * mpp )
600600 {
601601
602- if (! (mp -> m_mode & mode )) // skip entries with wrong mode
602+ if ((mp -> m_mode & mode ) == 0 )
603603 {
604+ // skip entries with wrong mode
604605 mpp = & (mp -> m_next );
605606 continue ;
606607 }
607608 if (!haskey ) // show all entries
608609 {
609- showmap (mp , map_table != maphash );
610- did_it = TRUE;
610+ if (!mp -> m_simplified )
611+ {
612+ showmap (mp , map_table != maphash );
613+ did_it = TRUE;
614+ }
611615 }
612616 else // do we have a match?
613617 {
@@ -643,8 +647,11 @@ do_map(
643647 }
644648 else if (!hasarg ) // show matching entry
645649 {
646- showmap (mp , map_table != maphash );
647- did_it = TRUE;
650+ if (!mp -> m_simplified )
651+ {
652+ showmap (mp , map_table != maphash );
653+ did_it = TRUE;
654+ }
648655 }
649656 else if (n != len ) // new entry is ambiguous
650657 {
Original file line number Diff line number Diff line change @@ -442,3 +442,19 @@ func Test_error_in_map_expr()
442442 call delete (' Xtest.vim' )
443443 exe buf .. ' bwipe!'
444444endfunc
445+
446+ func Test_list_mappings ()
447+ inoremap <C-M> CtrlM
448+ inoremap <A-S> AltS
449+ inoremap <S-/> ShiftSlash
450+ call assert_equal ([
451+ \ ' i <S-/> * ShiftSlash' ,
452+ \ ' i <M-S> * AltS' ,
453+ \ ' i <C-M> * CtrlM' ,
454+ \] , execute (' imap' )- >trim ()- >split (" \n " ))
455+ iunmap <C-M>
456+ iunmap <A-S>
457+ call assert_equal ([' i <S-/> * ShiftSlash' ], execute (' imap' )- >trim ()- >split (" \n " ))
458+ iunmap <S-/>
459+ call assert_equal ([' No mapping found' ], execute (' imap' )- >trim ()- >split (" \n " ))
460+ endfunc
Original file line number Diff line number Diff line change @@ -753,6 +753,8 @@ static char *(features[]) =
753753
754754static int included_patches [] =
755755{ /* Add new patch number below this line */
756+ /**/
757+ 2159 ,
756758/**/
757759 2158 ,
758760/**/
You can’t perform that action at this time.
0 commit comments