         self.themeTableView?.selectRowIndexes(IndexSet(integer: row), byExtendingSelection: false)
     }
     
+    
+    /// update selection of theme table
+    private func updateThemeSelection() {
+        
+        let themeName = ThemeManager.shared.userDefaultSettingName
+        let row = self.themeNames.firstIndex(of: themeName) ?? 0
+        
+        self.themeTableView?.selectRowIndexes(IndexSet(integer: row), byExtendingSelection: false)
+    }
+    
 }
 
 

    @IBAction func updateAppearanceSetting(_ sender: NSButton) {
        
        UserDefaults.standard[.documentAppearance] = AppearanceMode(rawValue: sender.tag)!
    }
    
    

        super.viewWillAppear()
        
        self.setupFontFamilyNameAndSize()
        
        self.updateThemeSelection()
        
        // select one of cursor type radio buttons
        switch UserDefaults.standard[.cursorType] {
