mux-sesh 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/app.tsx +12 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mux-sesh",
3
- "version": "1.3.6",
3
+ "version": "1.3.7",
4
4
  "description": "A beautiful tmux session manager built with OpenTUI - fuzzy search sessions, manage projects, clone from GitHub",
5
5
  "type": "module",
6
6
  "bin": {
package/src/app.tsx CHANGED
@@ -1,5 +1,5 @@
1
1
  import { useKeyboard } from '@opentui/react'
2
- import { useState, useEffect, useRef } from 'react'
2
+ import { useState, useEffect, useRef, use } from 'react'
3
3
  import { AppMode, ViewMode, type Item, type Config, type OpencodeSessionStats } from './types'
4
4
  import { loadConfig } from './config'
5
5
  import { listTmuxSessions } from './tmux'
@@ -294,6 +294,17 @@ export function App() {
294
294
  }
295
295
  }, [searchQuery, appMode, allItems])
296
296
 
297
+ useEffect(() => {
298
+ if (appMode === AppMode.Rename && textareaRef.current && renameTarget) {
299
+ setTimeout(() => {
300
+ if (textareaRef.current && !textareaRef.current.isDestroyed) {
301
+ const textLength = Bun.stringWidth(renameTarget)
302
+ textareaRef.current.cursorOffset = textLength
303
+ }
304
+ }, 0)
305
+ }
306
+ }, [appMode, renameTarget])
307
+
297
308
  const title =
298
309
  appMode === AppMode.Search
299
310
  ? ' Search Sessions'