peterh / liner

Pure Go line editor with history, inspired by linenoise
MIT License
1.05k stars 132 forks source link

Expose HistoryLimit #63

Closed ikandaswamy closed 8 years ago

ikandaswamy commented 8 years ago

Hi, Is it possible to have the value of the HistoryLimit be exposed ? I wanted to set the limit based on user input.

Thanks

peterh commented 8 years ago

HistoryLimit has to remain a constant to preserve the API.

A function to change the History Limit of a given state is possible, but it's not completely trivial. For example, when you submit your pull request please add a test for the outcome of reducing the history limit of a State that already contains more history than the new limit.