Skip to content

Commit a56dd2f

Browse files
committed
Fix selected bookmark actions
1 parent eafff8f commit a56dd2f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/BookmarkActions.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import javax.swing.event.MenuListener
1414

1515
class BookmarkActions(
1616
private val panel: BookmarksPanel,
17-
private val bookmarks: MutableList<Bookmark>,
1817
private val callbacks: IBurpExtenderCallbacks
1918
) : ActionListener {
2019
private val table = panel.table
@@ -88,7 +87,7 @@ class BookmarkActions(
8887
if (title.length > 10) {
8988
title = title.substring(0, 9) + "+"
9089
} else if (title.isBlank()) {
91-
title = "[^](${bookmarks.indexOf(selectedBookmark)}"
90+
title = "[^](${panel.bookmarks.indexOf(selectedBookmark)}"
9291
}
9392
callbacks.sendToRepeater(
9493
url.host,
@@ -152,7 +151,8 @@ class BookmarkActions(
152151
fun getSelectedBookmarks(): MutableList<Bookmark> {
153152
val selectedBookmarks: MutableList<Bookmark> = ArrayList()
154153
for (index in table.selectedRows) {
155-
selectedBookmarks.add(bookmarks[index])
154+
val row = panel.rowSorter.convertRowIndexToModel(index)
155+
selectedBookmarks.add(panel.model.displayedBookmarks[row])
156156
}
157157
return selectedBookmarks
158158
}

0 commit comments

Comments
 (0)