Add the cwd to the redux state (#1412)

This commit is contained in:
Matheus Fernandes 2017-01-15 20:40:47 -02:00 committed by Guillermo Rauch
parent d316592d8f
commit 232295a195

View file

@ -10,7 +10,8 @@ import {
SESSION_URL_SET, SESSION_URL_SET,
SESSION_URL_UNSET, SESSION_URL_UNSET,
SESSION_RESIZE, SESSION_RESIZE,
SESSION_SET_XTERM_TITLE SESSION_SET_XTERM_TITLE,
SESSION_SET_CWD
} from '../constants/sessions'; } from '../constants/sessions';
const initialState = Immutable({ const initialState = Immutable({
@ -102,6 +103,9 @@ const reducer = (state = initialState, action) => {
resizeAt: Date.now() resizeAt: Date.now()
})); }));
case SESSION_SET_CWD:
return state.setIn(['sessions', state.activeUid, 'cwd'], action.cwd);
default: default:
return state; return state;
} }