This is an automated email from the ASF dual-hosted git repository.

rstrickland pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/daffodil-vscode.git


The following commit(s) were added to refs/heads/main by this push:
     new 18d5f4d  V1.3.1 RC1 Hotfix: Search Result Highlighting - Fixed data 
editor issue where search results would not properly   highlight if within the 
current viewport data.
18d5f4d is described below

commit 18d5f4dc5989e054040b2bf09575c3d5e2b491db
Author: Robert Strickland <[email protected]>
AuthorDate: Wed Aug 2 10:42:14 2023 -0500

    V1.3.1 RC1 Hotfix: Search Result Highlighting
    - Fixed data editor issue where search results would not properly
      highlight if within the current viewport data.
---
 src/dataEditor/dataEditorClient.ts                              | 3 ---
 src/svelte/src/components/Header/fieldsets/SearchReplace.svelte | 8 ++++----
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/src/dataEditor/dataEditorClient.ts 
b/src/dataEditor/dataEditorClient.ts
index 7e7f532..b9920dd 100644
--- a/src/dataEditor/dataEditorClient.ts
+++ b/src/dataEditor/dataEditorClient.ts
@@ -351,9 +351,6 @@ export class DataEditorClient implements vscode.Disposable {
         break
 
       case MessageCommand.scrollViewport:
-        vscode.window.showInformationMessage(
-          `scrollViewport offset: ${message.data.scrollOffset}, bytesPerRow: 
${message.data.bytesPerRow}`
-        )
         await this.scrollViewport(
           this.panel,
           this.currentViewportId,
diff --git a/src/svelte/src/components/Header/fieldsets/SearchReplace.svelte 
b/src/svelte/src/components/Header/fieldsets/SearchReplace.svelte
index cf68eca..02b6ebf 100644
--- a/src/svelte/src/components/Header/fieldsets/SearchReplace.svelte
+++ b/src/svelte/src/components/Header/fieldsets/SearchReplace.svelte
@@ -207,6 +207,7 @@ limitations under the License.
       case MessageCommand.searchResults:
         if (msg.data.data.searchResults.length > 0) {
           $searchQuery.searchResults = msg.data.data.searchResults
+          $searchQuery.byteLength = msg.data.data.searchDataBytesLength
           switch (direction) {
             case 'Home':
               hasNext = msg.data.data.overflow
@@ -226,7 +227,7 @@ limitations under the License.
               hasPrev = msg.data.data.overflow
               break
           }
-          matchOffset = msg.data.data.searchResults[0]
+          matchOffset = $searchQuery.searchResults[0]
           scrollToMatch()
           if (searchStarted) {
             showReplaceOptions = false
@@ -240,12 +241,11 @@ limitations under the License.
           matchOffset = -1
           $searchQuery.overflow = showSearchOptions = showReplaceOptions = 
false
         }
-        $searchQuery.byteLength = msg.data.data.searchDataBytesLength
         searchStarted = replaceStarted = false
         updateSearchResultsHighlights(
-          msg.data.data.searchResults,
+          $searchQuery.searchResults,
           $viewport.fileOffset,
-          searchInputByteLen
+          $searchQuery.byteLength
         )
         $searchQuery.processing = false
         break

Reply via email to