Skip to content

fix: QuickOverview keyboard navigation to last slide#2345

Merged
antfu merged 2 commits into
mainfrom
copilot/fix-quickoverview-last-slide-jump
Nov 18, 2025
Merged

fix: QuickOverview keyboard navigation to last slide#2345
antfu merged 2 commits into
mainfrom
copilot/fix-quickoverview-last-slide-jump

Conversation

Copilot AI commented Nov 14, 2025

Copy link
Copy Markdown
Contributor

QuickOverview prevented navigation to the last slide when typing its number. In a 3-slide deck, typing '3' would reset the buffer instead of navigating.

Change

The validation used >= assuming zero-indexed slides, but slide numbers are one-indexed:

- if (+keyboardBuffer.value >= slides.value.length) {
+ if (+keyboardBuffer.value > slides.value.length) {
    keyboardBuffer.value = ''
    return
  }

With 3 slides:

  • Before: 3 >= 3 → true → buffer reset
  • After: 3 > 3 → false → navigation proceeds

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: node index.js --exec install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>QuickOverview doesn't allow jumping to last slide</issue_title>
<issue_description>Create presentation with 3 slides. Press g. Type 3. Nothing happens.

It's this line in QuickOverview. The >= assumes zero-indexing, but slides are one-indexed.

if (+keyboardBuffer.value >= slides.value.length) // should be >

Environment

  • Slidev version: v52.2.4
  • Browser: Chrome
  • OS: Mac
    </issue_description>

Comments on the Issue (you are @copilot in this section)


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@netlify

netlify Bot commented Nov 14, 2025

Copy link
Copy Markdown

Deploy Preview for slidev ready!

Name Link
🔨 Latest commit 4391402
🔍 Latest deploy log https://app.netlify.com/projects/slidev/deploys/6916e3505cd6ff0008c1f8ed
😎 Deploy Preview https://deploy-preview-2345--slidev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copilot AI changed the title [WIP] Fix QuickOverview to jump to last slide correctly Fix QuickOverview keyboard navigation to last slide Nov 14, 2025
Copilot AI requested a review from kermanx November 14, 2025 08:09
@pkg-pr-new

pkg-pr-new Bot commented Nov 14, 2025

Copy link
Copy Markdown

Open in StackBlitz

@slidev/client

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/client@2345

create-slidev

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev@2345

create-slidev-theme

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev-theme@2345

@slidev/parser

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/parser@2345

@slidev/cli

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/cli@2345

@slidev/types

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/types@2345

commit: 4391402

@pkg-pr-new

pkg-pr-new Bot commented Nov 14, 2025

Copy link
Copy Markdown

Open in StackBlitz

@slidev/client

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/client@2345

create-slidev

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev@2345

create-slidev-theme

npm i https://pkg.pr.new/slidevjs/slidev/create-slidev-theme@2345

@slidev/parser

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/parser@2345

@slidev/cli

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/cli@2345

@slidev/types

npm i https://pkg.pr.new/slidevjs/slidev/@slidev/types@2345

commit: 4391402

@kermanx kermanx changed the title Fix QuickOverview keyboard navigation to last slide fix: QuickOverview keyboard navigation to last slide Nov 14, 2025
@kermanx
kermanx marked this pull request as ready for review November 14, 2025 09:45
@antfu
antfu merged commit a10be9e into main Nov 18, 2025
36 checks passed
@antfu
antfu deleted the copilot/fix-quickoverview-last-slide-jump branch November 18, 2025 04:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

QuickOverview doesn't allow jumping to last slide

3 participants