hackmdio / hackmdio/hackmd-io-issues

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

Open
#308 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
40
Forks
9
PR merge metrics
No merged PRs in 30d

Description

### 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](https://user-images.githubusercontent.com/40707100/186716253-3fdf3fcb-13a1-43a8-be0f-761eb3a73d26.png)

Figure 2 - After modifying line 1
![image](https://user-images.githubusercontent.com/40707100/186716512-8a5f4df1-0258-433e-bf61-c67e002209e0.png)

Figure 3 - Ill-formed after refresh
![image](https://user-images.githubusercontent.com/40707100/186716581-727a3275-801c-401a-bd8d-54f936594315.png)

Provide steps to reproduce:

1. Switch to Vim mode
1. Fill in contents as in Figure 1
1. Move cursor to line 1
1. Press 'c-c' (replace whole line), line 1 will be cleared
1. Input "Changed Line1" and press Esc
Now it should look like Figure 2
1. Refresh the page by F5
1. 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)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.