[PR #4151] [MERGED] fix: codemirror crashing due to cursor not updating #4681

Closed
opened 2026-03-17 02:11:51 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hoppscotch/hoppscotch/pull/4151
Author: @nivedin
Created: 6/28/2024
Status: Merged
Merged: 7/2/2024
Merged by: @jamesgeorge007

Base: patchHead: fix/codemirror-cursor-bug


📝 Commits (1)

  • 8127371 fix: cursor not updating while filtering

📊 Changes

2 files changed (+8 additions, -15 deletions)

View changed files

📝 packages/hoppscotch-common/src/components/lenses/renderers/JSONLensRenderer.vue (+2 -2)
📝 packages/hoppscotch-common/src/composables/codemirror.ts (+6 -13)

📄 Description

Closes #4148

This PR fixes the issue in codemirror when user uses the JSON filter the JSON response section crashed sometimes.

What's changed

The issue was the codemirror cursor did not get updated w.r.t to the content, i.e the total charecter lenght line < the cursor position which should not happen.

https://github.com/hoppscotch/hoppscotch/assets/53208152/17d9103f-6f2e-437e-871d-3271202fb897


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hoppscotch/hoppscotch/pull/4151 **Author:** [@nivedin](https://github.com/nivedin) **Created:** 6/28/2024 **Status:** ✅ Merged **Merged:** 7/2/2024 **Merged by:** [@jamesgeorge007](https://github.com/jamesgeorge007) **Base:** `patch` ← **Head:** `fix/codemirror-cursor-bug` --- ### 📝 Commits (1) - [`8127371`](https://github.com/hoppscotch/hoppscotch/commit/812737173f0ca138dbac764c3a0954766541d55d) fix: cursor not updating while filtering ### 📊 Changes **2 files changed** (+8 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `packages/hoppscotch-common/src/components/lenses/renderers/JSONLensRenderer.vue` (+2 -2) 📝 `packages/hoppscotch-common/src/composables/codemirror.ts` (+6 -13) </details> ### 📄 Description Closes #4148 This PR fixes the issue in codemirror when user uses the JSON filter the JSON response section crashed sometimes. ### What's changed The issue was the codemirror cursor did not get updated w.r.t to the content, i.e the total charecter lenght line < the cursor position which should not happen. https://github.com/hoppscotch/hoppscotch/assets/53208152/17d9103f-6f2e-437e-871d-3271202fb897 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-17 02:11:51 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hoppscotch#4681
No description provided.