mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
Set current prompt as selected prompt after prompt change
This commit is contained in:
parent
c4aa223698
commit
ea2e1f016f
1 changed files with 2 additions and 1 deletions
|
@ -93,10 +93,11 @@ controllers.controller("promptController", function($scope, $http) {
|
|||
$scope.setNewPrompt = function(selectedPrompt) {
|
||||
$http.post("/set_prompt/","what=" + encodeURIComponent(selectedPrompt.function), { headers: {'Content-Type': 'application/x-www-form-urlencoded'} }).success(function(data, status, headers, config){
|
||||
|
||||
// Update attributes of current prompt
|
||||
// Update attributes of current prompt and select it
|
||||
$scope.samplePrompts[0].demo = selectedPrompt.demo;
|
||||
$scope.samplePrompts[0].function = selectedPrompt.function;
|
||||
$scope.samplePrompts[0].font_size = selectedPrompt.font_size;
|
||||
$scope.selectedPrompt = $scope.samplePrompts[0];
|
||||
})};
|
||||
|
||||
$scope.fetchSamplePrompts();
|
||||
|
|
Loading…
Reference in a new issue