diff --git a/features/sql-editor.mdx b/features/sql-editor.mdx index 0b89999..183b6d7 100644 --- a/features/sql-editor.mdx +++ b/features/sql-editor.mdx @@ -85,7 +85,7 @@ Redis has no transaction TablePro can open, so every command runs and answers as ### Stopping a batch -Stop (`Cmd+.`) acts between statements. The run halts before the next one goes out, and a transaction TablePro or the script opened is rolled back. A batch running outside a transaction keeps what it already wrote and shows no result for it, so refresh the table to see where it stands. +Stop (`Cmd+.`) acts between statements. The run halts before the next one goes out, and a transaction TablePro or the script opened is rolled back. A batch running outside a transaction keeps what it already wrote, and the statements that ran keep their results and their query history entries. The commit is the point of no return. While it is on the wire Stop is dimmed and says why, and nothing else reaches it either: closing the tab releases the tab and nothing more, and disconnecting queues behind the commit, so the server finishes it either way. A script's own `COMMIT` counts the same, and the statements after it become stoppable again. @@ -180,6 +180,10 @@ The editor toolbar carries a database picker, or a schema picker depending on th PostgreSQL, Redshift and CockroachDB reconnect the session to change database, so their picker shows a lock instead of a menu. The tab keeps the database it opened with, and a tab bound to anything other than the connection's active database runs on a separate connection. See [Cross-Database Tabs](/databases/postgresql#cross-database-tabs). +## Undo + +Each query tab keeps its own undo history, so switching to another tab and back leaves `Cmd+Z` where it was. **Clear Query**, loading a query from history, and **Apply to Editor** each count as one edit that `Cmd+Z` takes back. + ## Find and replace Press `Cmd+F` to open the find panel, `Cmd+G` and `Cmd+Shift+G` to walk the matches. Switch the panel to Replace mode to replace the current match or all of them. Match modes are contains, matches word, starts with, ends with, and regular expression, each with match case and wrap around toggles. diff --git a/features/tabs.mdx b/features/tabs.mdx index c46fb64..f41c73b 100644 --- a/features/tabs.mdx +++ b/features/tabs.mdx @@ -132,7 +132,7 @@ Both commands are in the **Window** menu as **Switch to Recent Tab** and **Switc ## Where a tab points -A tab is bound to one connection, database, and schema, and every query, refresh, filter, sort, structure read, and structure save it runs uses that binding. Switching tabs never changes the connection's saved default database. To point an existing tab somewhere else, use the database picker in the query editor's toolbar, a schema picker on servers that switch schemas: it moves that one tab to the other database or schema, the window goes with it, and it reruns the tab when it was showing rows. A statement that writes asks before it runs. To point it at another connection, [move the tab](#moving-a-query-tab-to-another-connection). +A tab is bound to one connection, database, and schema, and every query, refresh, filter, sort, structure read, and structure save it runs uses that binding. Switching tabs never changes the connection's saved default database. To point an existing tab somewhere else, use the database picker in the query editor's toolbar, a schema picker on servers that switch schemas: it moves that one tab to the other database or schema, the window goes with it, and it reruns the tab when it was showing rows. A statement that writes asks before it runs. The picker is dimmed while the tab runs a query, and unsaved edits in its results ask before they are discarded. To point it at another connection, [move the tab](#moving-a-query-tab-to-another-connection). The centred toolbar control names the frontmost tab's database, and clicking it switches to another. That is how you tell two tabs on one connection apart. On engines with schemas, **Database > Schema** names the one in use and switches it. @@ -150,7 +150,7 @@ PostgreSQL, Redshift, and CockroachDB keep one connection per database in the co | Per-table filters, column widths | | | Tab order, pinned tabs, and which tab was frontmost | | -The tab set is written when you switch tabs, a second after you stop typing, and every 30 seconds otherwise, so a crash costs at most the last half minute. On relaunch only the frontmost tab runs its query; the others load the first time you switch to them, and one that fails shows the error inline. Every connection on the [connections strip](/features/workspace-rail) comes back in the same order. One you canceled while it connected, or disconnected, comes back as **Not connected** and does not dial until you press **Connect**. A connection that cannot be reached shows the driver's error with **Try Again**, **Manage Connections…**, and **Copy Details**, and dials again at the next launch. Whether the last session reopens at all is [Startup Behavior](/customization/general-settings#startup). +The tab set is written when you switch tabs, a second after you stop typing, and every 30 seconds otherwise, so a crash costs at most the last half minute. On relaunch only the frontmost tab runs its query; the others load the first time you switch to them, and one that fails shows the error inline. A connection first opened on one table or query, from a link or **Reopen Closed Tab**, brings its saved tabs back behind that one, so they are still there at the next launch. Every connection on the [connections strip](/features/workspace-rail) comes back in the same order. One you canceled while it connected, or disconnected, comes back as **Not connected** and does not dial until you press **Connect**. A connection that cannot be reached shows the driver's error with **Try Again**, **Manage Connections…**, and **Copy Details**, and dials again at the next launch. Whether the last session reopens at all is [Startup Behavior](/customization/general-settings#startup). ## Row limits diff --git a/features/vim-mode.mdx b/features/vim-mode.mdx index bf7213e..58e63d9 100644 --- a/features/vim-mode.mdx +++ b/features/vim-mode.mdx @@ -160,7 +160,7 @@ Prefix a command with `"` and the register's name to pick one. | `` `< `` `` `> `` | Start, end of last visual selection | | `''` `` `` `` | Back to position before the last jump | -Marks shift when you insert or delete text before them. +Marks shift when you insert or delete text before them. Each query tab keeps its own marks. ## Search