Skip to content

Commit

Permalink
avoid duplicates in the history view
Browse files Browse the repository at this point in the history
  • Loading branch information
Dierk Koenig committed Jun 1, 2015
1 parent 4c61c5d commit 18b1949
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 2 additions & 1 deletion client/src/main/frege/org/frege/Application.fr
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@ doExecute mQueue inputArea items historySelection = do
then [trim script]
else [":{"] ++ lines script ++ [":}"]
mapM mQueue.put scriptLines -- the beef
items.add $ trim script
items.remove $ trim script
items.add $ trim script
historySelection.clearSelection
inputArea.setText ""
when (script == ":q") $ System.exit 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ data ObservableList = mutable native javafx.collections.ObservableList where
-- native addListener :: ObservableList e -> ListChangeListener e -> IO ()
-- native filtered :: ObservableList e -> Predicate e -> IO (FilteredList e)
native remove :: ObservableList -> Int -> Int -> IO ()
| ObservableList -> a -> IO ()
-- native removeAll :: ObservableList e -> MutableIO (JArray e) -> IO Bool
-- native removeListener :: ObservableList e -> ListChangeListener e -> IO ()
-- native retainAll :: ObservableList e -> MutableIO (JArray e) -> IO Bool
Expand All @@ -20,3 +21,4 @@ data ObservableList = mutable native javafx.collections.ObservableList where
native add :: ObservableList -> String -> IO Bool
| ObservableList -> Node -> IO Bool
native size :: ObservableList -> IO Int

0 comments on commit 18b1949

Please sign in to comment.