You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@daffodil.apache.org by "stricklandrbls (via GitHub)" <gi...@apache.org> on 2023/04/20 16:10:03 UTC

[GitHub] [daffodil-vscode] stricklandrbls opened a new pull request, #585: Search Scrolling Index Lag Fixed

stricklandrbls opened a new pull request, #585:
URL: https://github.com/apache/daffodil-vscode/pull/585

   - Too much offset input manipulation was happening with too many different variables before actually going to an offset. This has been reduced to modular arithmetic on the `searchIndex`
   
   Closes #584


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] scholarsmate commented on a diff in pull request #585: Search Scrolling Index Lag Fixed

Posted by "scholarsmate (via GitHub)" <gi...@apache.org>.
scholarsmate commented on code in PR #585:
URL: https://github.com/apache/daffodil-vscode/pull/585#discussion_r1173165905


##########
src/svelte/src/components/dataEditor.svelte:
##########
@@ -229,32 +229,13 @@ limitations under the License.
     goTo($gotoOffset)
   }
 
-  function scrollSearchResults(isNext: boolean) {
-    if ($searchResults.length > 0) {
-      let index = $searchIndex
-      if (isNext) {
-        index = index + 1
-        if (index >= $searchResults.length) {
-          index = 0
-        }
-      } else {
-        index = index - 1
-        if (index < 0) {
-          index = $searchResults.length - 1
-        }
-      }
-      $searchIndex = index
-      $gotoOffsetInput = $searchResults[index].toString($addressValue)
-      goTo($gotoOffset)
-    }
-  }
-
-  function scrollSearchNext() {
-    scrollSearchResults(true)
-  }
+  function updateSearchResults(offset?: number) {
+    $searchIndex = !offset

Review Comment:
   Why bother making the offset optional then blindly force it?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [daffodil-vscode] Shanedell merged pull request #585: Search Scrolling Index Lag Fixed

Posted by "Shanedell (via GitHub)" <gi...@apache.org>.
Shanedell merged PR #585:
URL: https://github.com/apache/daffodil-vscode/pull/585


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@daffodil.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org