hunk ./Yi/Editor.hs 49 - ,windows :: WindowSet Window + ,tabs :: WindowSet (WindowSet Window)

hunk ./Yi/Editor.hs 63 +windows :: Editor -> WindowSet Window +windows editor = + WS.current $ tabs editor +

hunk ./Yi/Editor.hs 103 -windowsA = Accessor windows (\f e -> e {windows = f (windows e)}) +windowsA = Accessor windows modifyWindows $ + where modifyWindows f e = + let ws = WS.current (tabs e) + ws' = f ws + tabs' = (tabs e) { WS.current = ws' } + in e {tabs = tabs' }

hunk ./Yi/Editor.hs 127 - ,windows = WS.new win + ,tabs = WS.new $ WS.new win

hunk ./Yi/Editor.hs 190 - windows = fmap pickOther (windows e) + tabs = fmap (fmap pickOther) (tabs e)

hunk ./Yi/Keymap/Vim.hs 909 + fn "tabnew" = withEditor newTabE

hunk ./Yi/Keymap/Vim.hs 312 - choice - ([c ?>>! action i | (c,action) <- singleCmdFM ] ++ + choice $ + [c ?>>! action i | (c,action) <- singleCmdFM ] ++ hunk ./Yi/Keymap/Vim.hs 315 - [char 'r' ?>> textChar >>= write . writeN . replicate i]) + [char 'r' ?>> textChar >>= write . writeN . replicate i + ,pString "gt" >>! nextTabE + ,pString "gT" >>! previousTabE] +

hunk ./Yi/Editor.hs 448 +-- | Creates a new tab containing a window that views the current buffer. +newTabE :: EditorM () +newTabE = do + bk <- getBuffer + k <- newRef + let win = Window False bk 0 k + modify $ \e -> e { tabs = WS.add (WS.new win) (tabs e) } + +-- | Moves to the next tab in the round robin set of tabs +nextTabE :: EditorM () +nextTabE = do + modify $ \e -> e { tabs = WS.forward (tabs e) } + +-- | Moves to the previous tab in the round robin set of tabs +previousTabE :: EditorM () +previousTabE = do + modify $ \e -> e { tabs = WS.backward (tabs e) }