hackmd-io-issues icon indicating copy to clipboard operation
hackmd-io-issues copied to clipboard

Text ill-formed after 'c-c' (replace whole line) in vim mode and refresh

Open yesiah opened this issue 2 years ago • 0 comments

Is this a hackmd.io issue?

  • [x] Yes, the bug happens on https://hackmd.io
  • [ ] No. If it's a self-hosted CodiMD instance, please fire up the issue in the repo of CodiMD: https://github.com/hackmdio/codimd

What's the problem

Text ill-formed after 'c-c' in Vim mode and refresh page.

Current behaviour

Figure 1 - Before image

Figure 2 - After modifying line 1 image

Figure 3 - Ill-formed after refresh image

Provide steps to reproduce:

  1. Switch to Vim mode
  2. Fill in contents as in Figure 1
  3. Move cursor to line 1
  4. Press 'c-c' (replace whole line), line 1 will be cleared
  5. Input "Changed Line1" and press Esc Now it should look like Figure 2
  6. Refresh the page by F5
  7. The content went ill-formed as in Figure 3

Note link: https://hackmd.io/@yesiah/Hy54AqEJs

Expected behaviour

After refresh, the content should remain the same as in Figure 2.

Environment

I use HackMD on:

Desktop

  • OS: Window 11
  • Browser: Chrome
  • Browser Version: 104.0.5112.102 (64 bits)

yesiah avatar Aug 25 '22 16:08 yesiah