Skip to main content
3 of 3
Minor improvement

The following should solve your issue:

nnoremap <expr> : ShowLastCmd()

function! ShowLastCmd()
  echohl ModeMsg
  echo ':' . getreg(':')
  echohl None

  while 1
    try
      let char = getchar()
      if char == '^\d\+$' || type(char) == 0
        let char = nr2char(char)
      endif
    catch /^Vim:Interrupt$/
      return ''
    endtry

    if char == "\<cursorhold>"
      continue
    elseif char == "\<cr>"
      return ':' . getreg(':') . "\<cr>"
    else
      return ':' . char
    endif
  endwhile
endfunction

The while loops is there to catch the <cursorhold> key event.